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