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