#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const long long LINF = 1LL << 50;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
int main() {
  int a, b;
  if (a < 10 && b < 10)
    cout << a * b << '\n';
  else
    cout << -1 << '\n';
}
