#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
  long long l, r;
  cin >> l >> r;
  if ((l > 0) && (r < 10))
    cout << l * r << "\n";
  else
    cout << -1 << "\n";
  return 0;
}
