package main

import (
	"bufio"
	"os"
	"strconv"
)

var s = bufio.NewScanner(os.Stdin)

func ScanLine() string {
	s.Scan()
	return s.Text()
}

func ScanInt() int {
	i, _ := strconv.Atoi(ScanLine())
	return i
}

func main() {
	p()
}

func p() int {
	a, b := ScanInt(), ScanInt()
	if a > 10 || b > 10 {
		return -1
	}
	return a * b
}
