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