import sys input=lambda:sys.stdin.readline().rstrip() print(['No','Yes'][sum(list(map(int,input().split())))%3==0])