#include <bits/stdc++.h>
int main() {
  int A, B, C;
  scanf("%d, %d", &A, &B);
  if (A < 1 || 10 < A || B < 1 || 10 < B) {
    C = -1;
  } else {
    C = A * B;
  };
  printf("%d", C);
  return 0;
};
