module Main where

import           Data.Maybe                     ( fromJust )
import           Data.List
import qualified Data.ByteString.Char8         as BS


bytestr2Int = fst . fromJust . BS.readInt
getIntL_H = map bytestr2Int . BS.words <$> BS.getLine


main :: IO ()
main = do
    [x, y] <- getIntL_H
    print $ cucable x y

cucable x y = if x < 10 && y < 10 then x * y else (-1)
