#include <bits/stdc++.h>
using namespace std;
const int MD = (int)1e9 + 7;
void dbg() { cerr << "\n"; }
template <class T, class... T2>
void dbg(const T& fst, const T2&... rst) {
  cerr << fst << ": ";
  dbg(rst...);
}
int main() {
  int a, b;
  cin >> a >> b;
  if (a > 9 || b > 9) puts("-1");
  cout << a * b << "\n";
  return 0;
}
