#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int ans = 0;
  if (1 <= a && a <= 9) ans++;
  if (1 <= b && b <= 9) ans++;
  if (ans = 2)
    cout << a * b << endl;
  else
    cout << "-1" << endl;
}
