main :: IO ()
main = do
  [a, b] <- map read . words <$> getLine
  print $ maybe -1 id $ solve a b
  
solve :: Int -> Int -> Maybe Int
solve a b
  | a > 9 = Nothing
  | b > 9 = Nothing
  | otherwise = Just (a * b)