#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  if (a < 10 && b < 10)
    cout << a * b << endl;
  else if (a < 10)
    cout << -1 << endl;
  return 0;
}
