d = list(map(int, input().split())) ans = any(d[i] % 2 == d[j] % 3 == 0 for i in range(3) for j in range(3) if i != j) print('Yes' if ans else 'No')