import sys data = sys.stdin.read().strip().split() N = int(data[0]) M = int(data[1]) if M == 10 * N or N == 10 * M: print("Yes") else: print("No")