a, b = gets.split.map(&:to_i)
unless a < 10 && b < 10
  puts -1 
else
  puts a*b
end

n=gets.to_i
(1..9).each do |x|
(1..9).each do |y|
  if x * y == n
    puts 'Yes'
    exit(0)
  end
end
end
puts 'No'
