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