#include<iostream>
 
using  namespace std;
 
void main()
{int a,b;
cin>>a>>b;
 
 if(a>0&&a<9){
   
   if(b>0&&b<9){
     cout<<a*b;}
 	else{
      cout<<"-1";
    }
   else{
     cout<<"-1";
 }
 }
 
 
   
}