my ($n, $m, $c) = glob<>; if ($n == 1 || $m == 1) { if ($n == 2 || $m == 2) { print "YES" } else { print "NO"; } } elsif (($n - 2) % 2 == 0 || ($m - 2) % 2 == 0) { print "YES" } else { print "NO" }