#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (!('0' <= c && c <= '9')) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (('0' <= c && c <= '9'))
    x = (x << 3) + (x << 1) + x - '0', c = getchar();
  return x * f;
}
const int N = 160;
int a, b;
int main() {
  a = read();
  b = read();
  if (a >= 1 && a <= 9 && b >= 1 && b <= 9)
    printf("%d\n", a * b);
  else
    printf("-1\n");
  return 0;
}
