#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1 << 30;
const int MAX = 1e5;
int n;
template <class T>
inline void xmin(T &a, T b) {
  a = (a < b) ? a : b;
}
template <class T>
inline void xmax(T &a, T b) {
  a = (a > b) ? a : b;
}
int a, b;
void solve() {
  cin >> a >> b;
  if (a > 9 || b > 9) {
    cout << -1 << endl;
  } else {
    cout << a * b << endl;
  }
}
signed main() {
  while (1) solve();
}
