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