
#include <bits/stdc++.h>
 
using namespace std;
 

int main()
{
	//ofstream fcout;
	//fcout.open("output.txt");
	
    ifstream fcin;
    cin.open("input.txt"); 

    	int x,y;
    	fcin>>x>>y;

    	if(x <= 9 && y <= 9)
    	cout<<x*y<<endl;
        else
        cout<<-1<<endl;

    fcin.close();
	//fcout.close();

	return 0;

}