import itertools as it def solve(): t = tuple(map(lambda s_: int(s_), input().split())) if (t[0] * t[1] * t[2]) % 6: return False for p in it.permutations(t): if p[0] % 3 == 0 and p[1] % 2 == 0: return True for i in range(3): nt = t[i:] + t[:i] if nt[0] % 6 == 0 and (nt[1] != 1 or nt[2] != 1): return True return False case_t = 1 # case_t = int(input()) for _ in [None] * case_t: cond = solve() print("Yes" if cond else "No")