#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1 << 29;
int main(void) {
  int n, m;
  cin >> n >> m;
  if (1 <= n && n <= 9 && 1 <= m && m <= 9)
    cout << n * m << endl;
  else
    cout << -1 << endl;
}
