#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
int k;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int a, b;
  cin >> a >> b;
  if ((a / 10 == 0) || (b / 10 == 0))
    cout << a * b;
  else
    cout << "-1";
  return 0;
}
