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