#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)

int main()
{
    int A, B;
    cin >> A >> B;
    if (A >= 10 || B >= 10)
    {
        cout << -1 < endl;
    }
    else
    {
        cout << A * B << endl;
    }
}
