A = list(map(int,input().split())) print("YNeos"[sum(A)%3!=0::2])