#include <bits/stdc++.h>
using namespace std;
clock_t time_p = clock();
void dem() {
  time_p = clock() - time_p;
  cerr << "Time Taken : " << (float)(time_p) / CLOCKS_PER_SEC << "\n";
}
using namespace std;
const int MAX = 1000 * 1000 + 10;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, 1, -1};
const int MOD = 1000 * 1000 * 1000 + 9;
const int N = 301;
const int INF = INT_MAX;
const int M = 200005;
int main() {
  int a, b;
  cin >> a >> b;
  cout << (a * b >= 10 ? -1 : a * b);
  return 0;
}
