#include <bits/stdc++.h>
int DBG = 1;
int main() {
  int a, b, c, i, j, k, n, m, x, y;
  char str[256];
  double ans;
  scanf("%d %d", &a, &b);
  if ((a >= 1) && (a <= 9) && (b <= 1) && (b >= 9)) {
    printf("%d\n", a * b);
  } else {
    printf("-1\n");
  }
  return 0;
}
