#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using p = pair<int, int>;
int main() {
  int A, B;
  cin >> A >> B;
  if (1 <= A <= 9 && 1 <= B <= 9)
    cout << A * B << endl;
  else
    cout << "-1" << endl;
  return 0;
}
