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