#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int) n; i++)
using ll = long long;
template <class T>
using vt = vector<T>;
using vvi = vector<vector<int>>;

int main() {
  inr a,b;
  cin >> a >> b;
  if(a>9||b>9)
    cout << -1;

  else
    cout << a*b;
  return 0;
}
