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