function Main(input) {
    var data = input.split("\n")
	var num = data[0].split(' ');
	if(num[0] >9 || num[1] > 9) {
		console.log('-1');
	}else {
		console.log(num[0] * num[1]);
	}
}
 
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));