#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  cin >> a >> b;
  int result = 0;
  if (1 <= a <= 9 && 1 <= b <= 9) {
    result = a * b;
  } else {
    result = -1;
  }
  cout << result << endl;
}
