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