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