main :: IO()
main = do
  (a:b:xs) <- map read . words <$> getLine
  putStrLn . show $ solve a b

solve :: Int -> Int -> Int
solve a b = 
  if 1 <= a && a <= 9 && 1 <= b && b <= 9 then   
    a * b
  else
    -1