"use strict"

const arg_str = require('fs').readFileSync('/dev/stdin', 'UTF-8').split(' ')
const A = arg_str[0]
const B = arg_str[1]

if(A < 10 && B < 10){
    console.log(A * B)
}else{
    console.log(-1)
}