#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 >= 1 && r <= 9)
    cout << l * r << "\n";
  else
    cout << -1 << "\n";
  return 0;
}
