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