input = require('fs').readFileSync('/dev/stdin', 'utf8')
lines = input.split('\n')
line = lines.shift().split(' ')
a = line[0] * 1
b = line[1] * 1 
if (a <= 9 && b <= 9 ) {
    console.log(a * b)
} else {
    console.log(-1)
}
