#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'
#define ninf -2147483648
#define INF 1e9    

#define fastio(); ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
 





int a[300005];
bool b[105];
char c[1000005];



int main() {
    fastio();
    //int t;cin>>t;
  
    
    int x,y;
  	cin>>x>>y;
  	if(x>9 || y>9)
      cou<<"-1";
    else 
      cout<<x*y;
    
    
    
    
return 0;
}
 