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