[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reada f = stdin.ReadLine().Split() |> Array.map f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let [A;B] = reads int
    if A >= 10 || B >= 10 then
        printfn "-1"
    else
        printfn "%i" (A * B)
    0