#include <bits/stdc++.h>
using namespace std;
long long num[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
bool uru(long long checkyear) {
  if (checkyear % 4 == 0) {
    if (checkyear % 100 != 0 || checkyear % 400 == 0) return true;
  }
  return false;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
signed main() {
  long long x = 0, y = 0, z = 0, w = 0, n = 0, m = 0;
  std::cin >> x >> y;
  if (x < 10 && y < 10) std::cout << x * y << '\n';
  std::cout << -1 << '\n';
}
