#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10, OO = 0x3f3f3f3f;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int rkm1, rkm2;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cout.tie(0);
  cin >> rkm1 >> rkm2;
  if (rkm1 >= 1 && rkm2 <= 9 && rkm2 >= 1 && rkm2 <= 9)
    cout << (rkm1 * rkm2) << "\n";
  else
    cout << "-1\n";
  return 0;
}
