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