#include <bits/stdc++.h>
using namespace std;
inline int read() {
  register int s = 0, f = 0;
  register char ch = getchar();
  while (not isdigit(ch)) f |= (ch == '-'), ch = getchar();
  while (isdigit(ch)) s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
  return f ? -s : s;
}
int a, b;
signed main(void) {
  a = read(), b = read();
  if (a > 10 || b > 10 || a < 0 || b < 0)
    printf("-1");
  else
    printf("%d", a * b);
  return 0;
}
