#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  if (1 <= A and A <= 9) {
    if (1 <= B and B <= 9) {
      cout << A * B << endl;
      exit(0);
    }
    cout << "-1" << endl;
  }
}
