clude <bits/stdc++.h>
using namespace std;
vector <int> v;
int main(){
	int a,b;
  	cin >> a >> b;
	if(a < 10 and a > 0 and b < 10 and b > 0)
    	cout << a*b;
	else
      	cout <<"-1";
 
	return 0;
}