#include<iostream>
using namespace std;

int main(){
  
	int k, l;
  	cin >> k >> l;
  
  	int total = k * l;
  
  	if( k > 9 || l > 9){
      cout << -1 << endl;
    }else{
      cout << total << endl;
    }
    
  	