#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  istringstream ss, sa;
  if (static_cast<int>(a.length()) > 1 || static_cast<int>(b.length()) > 1) {
    cout << -1 << endl;
    return 0;
  }
  ss = istringstream(a);
  sa = istringstream(b);
  int q, w;
  ss >> q;
  sa >> w;
  cout << q * w << endl;
  return 0;
}
