X = sum(map(int, input().split()))

print('No' if X%3 > 0 else 'Yes')