#include <bits/stdc++.h>
using namespace std;
ifstream f("dfs.in");
ofstream g("dfs.out");
int a, b;
int main() {
  f >> a >> b;
  if (a <= 9 && b <= 9)
    g << a * b;
  else
    g << -1;
  return 0;
}
