#include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <sstream>

#include <string>
#include <vector>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <deque>
#include <algorithm>
#include <random>
using namespace std;


int main(int argc, char *argv[]) {
    int a, b;
    cin >> a >> b;
    if (a <= 9 && b <= 9)
        cout << a * b << endl;
    else
        cout << -1 << enel;
}


