#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e, i, j, m = -11, n, x, y, z, k = 0;
  cin >> a >> b;
  if (a >= 1 && b < 10) {
    printf("%d\n", a * b);
  } else
    cout << "-1" << endl;
}
