func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let AB = readInts()
let A = AB[0]
let B = AB[1]
let kuku = A * B
if A <= 9 && B <= 9 {
  print(kuku)
} else {
  print(-1)
}

