#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Edge = pair<int, long long>;
using Graph = vector<vector<Edge>>;
struct aaa {
  aaa() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(20);
  };
} aaaaaaa;
int MOD = 1e9 + 7;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
  int A, B;
  cin >> A >> B;
  if (A > 10 || B > 10)
    cout << ("-1") << '\n';
  else
    cout << (A * B) << '\n';
}
