#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
  int a, b;
  cin >> a >> b;
  if (a > 10 || b > 10) {
    cout << -1 << endl;
    return 0;
  }
  cout << a * b << endl;
  return 0;
}
