#include <bits/stdc++.h>
using namespace std;
int x, y;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch > 57 || ch < 48) {
    if (ch == 45) f = -1;
    ch = getchar();
  }
  while (ch <= 57 && ch >= 48) {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  return x * f;
}
int main() {
  freopen("A.in", "r", stdin);
  freopen("A.out", "w", stdout);
  x = read();
  y = read();
  if (x > 9 || y > 9) puts("-1");
  cout << x * y << endl;
  return 0;
}
