defmodule Main do
  def main do
    [a, b] =
      IO.read(:line)
      |> String.trim()
      |> String.split()
      |> Enum.map(&String.to_integer/1)
 
    ans = if a < 10 and b < 10
    		a * b
          else
            -1
          end
    IO.puts(ans)
  end
end
