#include <bits/stdc++.h>
using namespace std;
 
int main() {
  
  int A; 
  int B;
  
  cin >> A >> B;
  
  int X;
  
  if (A =< 9 && B =< 9){
    X = A * B;
    cout << X
  }
  
  else {
    cout << -1
  }
}
    

 
  
  

