#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a, b;
  if (a >= 0 and a <= 9 and b <= 9 and b >= 0)
    cout << a * b << endl;
  else
    cout << -1 << endl;
  return 0;
}
