function Main(input) {
    input.trim().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);
        }
    });
}

process.stdin.resume();
process.stdin.setEncoding("utf8");
var globalInput = '';
process.stdin.on('data', function(chunk) {
    globalInput += chunk;
})
process.stdin.on('end', function() {
    Main(globalInput)
})

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