print(["Yes", "No"][sum(list(map(int, input().split()))) % 3 > 0])