if sum(map(int, input().split())) % 3 == 0: print("Yes") else: print("No")