#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9;
const int del = 728729;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int a, b;
  if (a <= 9 and b <= 9) {
    cout << a * b;
  } else
    cout << -1;
  return 0;
}
