#include <bits/stdc++.h>
int main() {
  int a, b;
  scanf("%d %d ", &a, &b);
  int c;
  c = a * b;
  if (a <= 9 && a >= 0 && b >= 0 && b <= 9)
    printf("%d ", c);
  else
    printf("-1");
  return 0;
}
