#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  if (n > 9 || m > 9) {
    cout << -1;
  }
  cout << n * m;
  return 0;
}
