#include <bits/stdc++.h>
using namespace std;
int a, b;
int main() {
  cin >> a >> b;
  if (a >= 1 && a <= 9)
    if (b >= 1 && b <= 9)
      cout << a * b << '\n';
    else
      cout << "-1\n";
  return 0;
}
