#coding: utf-8 ##yuki_208 s=[(0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(1,1),(1,2),(1,3),(1,4),(1,6),(2,3),(2,4),(2,5),(3,3),(3,4),(3,6),(4,5)] x,y=map(int,raw_input().split()) if abs(x)>abs(y): x,y=y,x if (abs(x),abs(y)) in s: print "YES" else: print "NO"