#include <bits/stdc++.h>
inline int in();
inline void wr(int);
int main(int argc, char** argv) {
  register int a = in(), b = in();
  if (a > 9 || b > 9) {
    wr(-1), putchar('\n');
    return 0;
  }
  wr(a * b), putchar('\n');
}
inline int in() {
  register char c = getchar();
  register int x = 0, f = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') f = -1;
  for (; c >= '0' && c <= '9'; c = getchar())
    x = (x << 1) + (x << 3) + (c & 15);
  return x * f;
}
inline void wr(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x / 10) wr(x / 10);
  putchar(x % 10 + '0');
}
