#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define de cout<<"siktim seni\n";
ll int a,i,ans;
string b;
int main(){
	cin>>a>>b;
	if(a>9 or b>9){cout<<"-1";return 0;}
	cout<<(a*b);
}