def get_int
  gets.chop.to_i
end

def get_ints
  gets.chop.split.map(&:to_i)
end

def get_double
  gets.chop.to_f
end

def get_str
  gets.chop
end

def get_strs
  gets.chop.split
end

def main
  a, b = get_ints
  if a <= 9 and b <= 9
    puts a * b
  else
    puts -1
  end
end

if __FILE__ == $0
  main
end
