#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a, b;
  cin >> a >> b;
  if (max(a, b) >= 10) {
    cout << -1 << endl;
  } else {
    cout << a * b << endl;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long tests = 1;
  while (tests--) {
    solve();
  }
  return 0;
}
