#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, result;
  cin >> a >> b;
  if (a >= 10 || b >= 10) {
    result = -1;
  } else {
    result = a * b;
  }
  cout << result;
  return 1;
}
