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