function Main(input) {
	input.split("\n").forEach(line => {
		var a = line.split(" ").map(i => parseInt(i));
      	var x = a[0];
      	var y = a[1];
      	if (x <= 9 && y <= 9) {
			console.log(x * y);
		} else {
        	console.log(-1);
        }
	});
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));