package main

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

var s = bufio.NewScanner(os.Stdin)

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

func main() {
	p()
}

func ScanInts() (int, int) {
	str := ScanLine()
	v := strings.Split(str, " ")
	a, _ := strconv.Atoi(v[0])
	b, _ := strconv.Atoi(v[1])
	return a, b
}

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