module Main where

import Data.List
import qualified Data.Map.Strict as Map
import Control.Monad
import Data.Ord

main = do
    print =<< solve <$> readInts

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


solve :: [Int] -> Int
solve [a, b]
    | a >= 10 = -1
    | b >= 10 = -1
    | otherwise = a * b

