#include <bits/stdc++.h>
using namespace std;
vector<int> b, j;
int main() {
  int a, b;
  cin >> a >> b;
  while (a && b > 0) {
    if (a || b > 9) {
      cout << -1 << "\n";
    } else {
      cout << a * b << "\n";
    }
  }
}
