#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  if (N < 10 && N > 0) {
    if (M < 10 && M > 0) {
      cout << N * M << endl;
    }
  } else
    cout << -1;
  return 0;
}
