a = [int(v) % 3 for v in input().split()] if all(a): print("No") else: print("Yes")