#include <bits/stdc++.h>
using namespace std;
int solve() {
  int a, b;
  cin >> a >> b;
  if (a >= 1 && a <= 9 && b >= 1 && b <= 9)
    cout << a * b << '\n';
  else
    cout << "-1\n";
  return 0;
}
void fun() {
  int t = 1;
  while (t--) solve();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  fun();
  return 0;
}
