#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vd = vector<double>;
using vc = vector<char>;
int main() {
  int a, b;
  cin >> a >> b;
  if (0 < a && a < 10 && 1 < b && b < 10)
    cout << a * b << endl;
  else
    cout << "-1" << endl;
}
