N = map(int, input().split()) print("Yes" if any([a % 3 == 0 for a in N]) else "No")