#include <bits/stdc++.h>
using namespace std;
using namespace std;
void solve() {
  long long a, b;
  cin >> a >> b;
  if (a <= 9 && b <= 9)
    cout << a * b << "\n";
  else
    cout << "-1\n";
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  long long test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
