#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, a, b;
  cin >> a >> b;
  if (a < 10) {
    i = a * b;
    cout << i << endl;
  } else if (b < 10) {
    j = a * b;
    cout << j << endl;
  } else {
    cout << "-1" << endl;
  }
  return 0;
}
