x,y=gets.split.map{|i|i.to_i.abs} puts x>6||y>6||[126,125,110,125,122,84,40][x][y]<1?:NO:'YES'