import Foundation

let imput_num:String = readLine()!

let ab:[String] = imput_num.componentsSeparatedByString(" ")
let a = Int(ab[0])!
let b = Int(ab[1])!

if a < 10 {
  if b < 10 {
    print(a*b)
  } else {
  	print(-1)
  }
} else {
  print(-1)
}