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