#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a;
  cin >> b;
  if (a > 9 && a < 1) {
    cout << -1 << endl;
  } else if (b > 9 && b < 1) {
    cout << -1 << endl;
  } else {
    c = a * b;
    cout << c << endl;
  }
  return 0;
}
