#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vl = vector<ll>;
const int ARRAY = 100005;
const int INF = 1001001001;
const ll LINF = 1001001001001001001;
const int MOD = 1e9 + 7;
ll N = 0;
ll A, B;
ll t;
ll ret = 0;
void input() {
  cin >> A;
  cin >> B;
}
void solve() {
  if (A > 10 || B > 10) {
    cout << (-1) << endl;
  } else {
    cout << (A * B) << endl;
  }
}
int main(void) {
  input();
  solve();
}
