#include <bits/stdc++.h>
#include <xmath.h>


#define long long long int

using namespace std;


typedef vector<int> vi;
typedef pair<int, int> pi;

void print(const vector<long> &a) {
    for (auto item : a) {
        cout << item << " ";
        flush(cout);
    }
}



int main() {

    int a, b;
    cin >> a >> b;

    if (a > 9 or b > 9){
        cout << a * b;
    } else {
        cout << -1;
    }


    return 0;
}