package main

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

var s = bufio.NewScanner(os.Stdin)

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

func main() {
	fmt.Println(p())
}

func ScanInt() int {
	a, err := strconv.Atoi(Scan())
	if err != nil {
		panic(err)
	}
	return a
}

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