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