#include <bits/stdc++.h>
unsigned long long factor[300];
unsigned long long memory[300];
void primefac(unsigned long long num) {
  int i = 0, kosuu = 0;
  while (*(factor + i) != 0) {
    while (num % *(factor + i) == 0) {
      num /= *(factor + i);
      memory[*(factor + i)] += 1;
    }
    if (num == 1) break;
    i++;
  }
}
int elast(unsigned long long number) {
  unsigned long long tmp = 0;
  int flag = 0;
  *factor = 2;
  for (int i = 3; i <= number; i++) {
    flag = 0;
    for (int j = 0; j <= tmp; j++) {
      if (i % (*(factor + j)) == 0) {
        flag = 1;
        break;
      }
    }
    if (flag) continue;
    tmp += 1;
    *(factor + tmp) = i;
  }
  return tmp + 2;
}
int compare(const int *a, const int *b) {
  if (*a < *b)
    return -1;
  else if (*a > *b)
    return 1;
  return 0;
}
unsigned long long nCr(int n, int r) {
  unsigned long long val = 1;
  int i;
  if (r == 0) return 1;
  for (i = 0; i < n - r; i++) {
    val *= (n - i);
    val /= (i + 1);
  }
  return val;
}
unsigned long long nPr(int n, int r) {
  unsigned long long val = 1;
  int i;
  for (i = 0; i < r; i++) {
    val *= (n - i);
  }
  return val;
}
int main() {
  int array[100000];
  int N, K, i, j, A, B;
  int *inp;
  char *chp;
  unsigned long long sum = 0;
  scanf("%d", &A, &B);
  if ((A > 0) && (B > 0)) {
    if ((10 > A) && (10 > B)) {
      printf("%d", A * B);
      return 0;
    }
  }
  printf("%d", -1);
  return 0;
}
