use strict; use warnings; my ($x, $y) = split / /, <>; if($x < 0) { $x *= -1; } if($y < 0) { $y *= -1; } if($x > $y) { ($x, $y) = ($y, $x); } if(($x > 6)||($y > 6)) { print "NO\n"; exit; } if((($x == 2)&&($y == 2))||(($x == 4)&&($y == 4))||(($x == 5)&&(($y == 1)||($y == 3)||($y == 5)))||($x == 6)&&((($y == 0)||($y == 2)||($y == 4)||($y == 5)||($y == 6)))) { print "NO\n"; exit; } print "YES\n"; exit;