function main(input){
  input = input.split(' ').map(parseInt);
  
  if(input[0] >= 10 || input[1] >= 10){
    console.log(-1);
    return;
  }
  
  console.log(input.reduce((arr,cur) => arr * cur)); 
}
 
main(require("fs").readFileSync("/dev/stdin","utf8"));