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