#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b;
  cin >> a >> b;
  if ((1 <= a <= 9) && (1 <= b <= 9)) {
    cout << a * b;
  } else {
    cout << -1;
  }
  return 0;
}
