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

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