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