#include <bits/stdc++.h>
using namespace std;
void solve() {
  int64_t a, b;
  cin >> a >> b;
  if (a < 10 && b <= 10)
    cout << a * b << "\n";
  else
    cout << -1 << "\n";
}
signed main() {
  int64_t T = 1;
  while (T--) solve();
  return 0;
}
