#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  if (1 <= a <= 9 && 1 <= b <= 9) {
    cout << a * b << '\n';
    return 0;
  }
  cout << -1 << '\n';
  return 0;
}
