#include <iostream>

using namespace std;

int main(){
  int A,B;
  cin >> A >> B;
  if(A > 10 or B > 10){
    cout << "-1" << endl;
  }elseif(A > 10 and B > 10){
    cout << "-1" << endl;
  }else{
    cout << A*B << endl;
  }
}
