#include<bits/stdc++.h>
#define rep(i, n) for(i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;

ll A, B;

void input(){
  cin >> A >> B;
}

void solve(){
  input();
  ll ans;
  if(a <= 9 && b <= 9){
    ans = -1;
  } else {
    ans = a*b;
  }
  cout << ans << endl;
}

int main(){
  solve();
  return 0;
}