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