#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main() {
  int a, b;
  std::cin >> a >> b;
  std::cout << (a <= 9 || b <= 9 ? a * b : -1) << endl;
  return 0;
}
