function Main(input) {
    lines = input.split('\n')
    line = lines[0].split(" ");
    n = parseInt(line[0]);
    m = parseInt(line[1]);
    if (n < 10 && m < 10) {
        console.log(n * m);
    } else {
        console.log(-1);
    }

}

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