"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const A = parseInt(arg[0].split(" ")[0]);
    const B = parseInt(arg[0].split(" ")[1]);
    
    if(A >= 10 || B >= 10) {
        console.log(-1);
        return;
    }
    
    if(A <= 0 || B <= 0) {
        console.log(-1);
        return;
    }
    
    console.log(A * B);
    
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));