#include <bits/stdc++.h>
using namespace std;
int intlog(double x) { return (int)(log(x) / log(2)); }
double max(double x, double y) {
  if (x >= y) {
    return x;
  } else {
    return y;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int l, r;
  cin >> l >> r;
  if (l >= 1 && l <= 9) {
    if (r >= 1 && r <= 9) {
      cout << l * r;
      return 0;
    }
  }
  cout << -1 << endl;
}
