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