function main(arg) {
    var num1 = arg.split(/\s+/g)[0];
    var num2 = arg.split(/\s+/g)[1];
    var seki = num1*num2;
    if(num1<10&&num2<10&&num1>0&&num2>0){
    	console.log(seki);
    }else{
    	console.log(-1);
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));