const fs = require("fs");

function main(input) {
    r = input.some((i) => {
        return parseInt(i,10) <= 9 
    })
    if(r) {
        console.log(parseInt(input[0],10)*parseInt(input[1],10))
    }else{
        console.log("-1")
    }
}

const input  = fs.readFileSync("/dev/stdin","utf8").split("\n")[0].split(" ")
main(input)