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