#include <bits/stdc++.h>
using namespace std;
void print(const vector<long long int> &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;
}
