package main
import {
  "fmt"
  "os"
  "bufio"
  "strconv"
  "strings"
}

func main() {
  stdin := bufio.NewScanner(os.Stdin)
  stdin.Scan()
  text := stdin.Text()
  s := strings.Split(text, " ")
  if s[0] > 9 or s[1] > 9 {
    print(-1)
  } else {
    print(s[0] * s[1])
  }
}