a,b = map(int,input().split()) import sys if a == b: print('YES') exit() if a == 2 and b == 4: print('YES') exit() if a == 4 and b == 2: print('YES') exit() print('NO')