def abs(p):
    if p<0:
        p*=-1
    return p
X,Y=(int(i) for i in input(). split ())
x=abs(X)
y=abs(Y)
if x<y:
    m=y
    ot=x
else:
    m=x
    ot=y
if m==0 or m==1 or m==3:
    print ("YES")
elif m<=4:
    if ot!=m:
         print ("YES")
    else:
         print("NO")
elif m==5:
    if ot==0 or ot==2 or ot==4:
        print ("YES")
    else:
        print ("NO")
elif m==6:
    if ot==1 or ot==3:
        print ("YES")
    else:
        print ("NO")
else:
    print ("NO")