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