import Control.Applicative
import Control.Monad
import Data.Functor
import Data.List

readInts :: IO [Int]
readInts = map read . words <$> getLine

solve [a, b]
  | a < 10 && b < 10 = a * b
  | otherwise = -1

main = solve <$> readInts >>= print