#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  for (int a = 1; a < 10; a++)
    for (int b = 1; b < 10; b++)
      if (a >= 10) cout << "-1";
  if (b >= 10) cout << "-1";
  if (a < 10 and b < 10) cout << a * b;
  return 0;
}
