#include <bits/stdc++.h>
using namespace std;
int a, b;
int main() {
  cin >> a >> b;
  if (a >= 9 || b >= 9 || a < 1 || b < 1) {
    printf("-1\n");
    return 0;
  } else {
    printf("%d\n", a * b);
    return 0;
  }
  return 0;
}
