X,Y = [int(i) for i in input().split()]
X,Y = abs(X),abs(Y)
if X<Y:
    X,Y = Y,X
if X*Y >= 24:
    print("NO")
elif X>6 or Y>6:
    print("NO")
elif X==6 and Y==0 or X==5 and Y==1:
    print("NO")
elif X==2 and Y==2 or X==6 and Y==2:
    print("NO")
elif X==5 and Y==3 or X==4 and Y==4:
    print("NO")
else:
    print("YES")