#include <bits/stdc++.h>
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
using namespace std;
int main(void) {
  int a, b;
  cin >> a >> b;
  if (a < 1 || b > 9 || b < 1 || b > 9)
    cout << -1 << endl;
  else
    cout << a * b << endl;
  return 0;
}
