import functools as ft print("Yes" if ft.reduce(lambda a,b: a * b, [int(x) for x in input().split()]) % 3 == 0 else "No")