Problem:
Score : 100 points

Problem Statement

Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together. He cannot do any other calculation.

Given are two integers A and B.

If Takahashi can calculate A \times B, print the result; if he cannot, print -1 instead.

Constraints

1 \leq A \leq 20

1 \leq B \leq 20

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

If Takahashi can calculate A \times B, print the result; if he cannot, print -1.

Sample Input 1

2 5

Sample Output 1

10

2 \times 5 = 10.

Sample Input 2

5 10

Sample Output 2

-1

5\times 10 = 50, but Takahashi cannot do this calculation, so print -1 instead.

Sample Input 3

9 9

Sample Output 3

81

Solution in JavaScript (node.js v5.12) (judge verdict: Wrong Answer)

function Main(input) {
    input.trim().split("\n").forEach(line => {
        console.log(line);
        var a = line.split(" ").map(i => parseInt(i));
        var x = a[0];
        var y = a[1];
        if (x <= 9 && y <= 9) {
            console.log(x * y);
        } else {
            console.log(-1);
        }
    });
}

process.stdin.resume();
process.stdin.setEncoding("utf8");
var globalInput = '';
process.stdin.on('data', function(chunk) {
    globalInput += chunk;
})
process.stdin.on('end', function() {
    Main(globalInput)
})

// Main(require("fs").readFileSync("/dev/stdin", "utf8"));