x, y, z = map(int, input().split()) if any([n % 3 == 0 for n in [x, y, z]]): print("Yes") else: print("No")