#include <bits/stdc++.h>
using namespace std;
int main() {
  int a = 0;
  int b = 0;
  int ans = 0;
  cin >> a >> b;
  ans = a * b;
  if (a > 10 || b > 10) {
    ans = -1;
  }
  cout << ans << endl;
  return 0;
}
