a, b = map(int, input().split()) if pow(a, b, 10 ** 9 + 7) == pow(b, a, 10 ** 9 + 7): print("Yes") else: print("No")