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