#include <iostream>
using namespace std;
 
#define TIF(c,a,b) (c ? a : b)
#define FOR(i, m, n) for (ll i = m; i < ll(n); ++i)
#define READ(v) std::cin >> v;
#define WRITE(v) std::cout << v;
#define USORT(a,n) sort(a, a + n);
#define LSORT(a,n) sort(a, a + n, greater<int>());
 
#define cin std::cin
#define cout std::cout
using ll = long long;
using ull = unsigned long long;
 
int main()
{
  int a,b;
  cin >> a >> b;
  cout << (a <= 9 || b <= 9) ? a*b : -1)  << endl;
  return 0;
}