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