#include <bits/stdc++.h>
using namespace std;
vector<long long> vec;
map<string, long long> mps;
map<long long, string> mpss;
set<long long> s1;
set<string> s2;
map<string, long long>::iterator str;
set<long long>::iterator itr;
long long tra[100006], tra1[100006];
long long n, m;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  map<long long, long long> mp;
  map<long long, long long>::iterator it;
  string s, s1;
  long long lock = 0, sum = 0, co = 0;
  cin >> n >> m;
  if (n > 10 || m > 10)
    cout << "-1" << endl;
  else
    cout << n * m << endl;
  s1.clear();
  vec.clear();
}
