#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  if (!(n < 10 && m << 10) || (n == 0 || m == 0)) {
    cout << -1 << endl;
    return 0;
  }
  cout << n * m << endl;
  return 0;
}
