a, b = map(int, input().split()) if a == b: print("Yes") elif a >= 10 or b >= 10: print("No") elif a ** b == b ** a: print("Yes") else: print("No")