const Main = (input) => {
    const _input = input.split(" ");
    const A = _input[0];
    const B = _input[1];

    const answer = (A > 9 || B > 9) ? -1 : A * B;

	console.log(answer);
}

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