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