func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func main() {
    let ab = readInts()
    if 1 <= ab[0] && ab[0] <= 9 && 1 <= ab[1] && ab[1] <= 9 {
        print(ab[0] * ab[1])
    } else {
        print("-1")
    }
}

main()
