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