#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 (a < 10 && b < 10) {
    cout << a * b << endl;
  }
  cout << -1 << endl;
  return 0;
}
