#include <iostream>
using namespace std;

int main() {
	int a,b;
  	cin >>a>>b;
  	if(a>9){
      cout<<-1<<endl:
    }
  	else if(b>9){
      cout<<-1<<endl;
    }
  	else{
      int c=a*b;
      cout<<c<<endl
	return 0;
}