require 'pp'

def gets; ARGF.gets; end

class Solver

  def initialize
  end

  def main
    a, b = gets.chomp.split.map(&:to_i)

    if 1 <= a && a <= 9 && 1 <= b && b <= 9
      puts a * b
    else
      puts -1
    end
  end
end

if __FILE__ == $0
  Solver.new.main
end
