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