import Control.Applicative

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

solve :: Int -> Int -> String
solve x y = if (1 <= x && x <= 9) && (1 <= y && y <= 9)
            then show (x * y)
            else "-1"