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