#include<bits/stdc++.h>
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;

int main() {
	IO
	cin>>n>>m;
	if(!(n<10&&m<<10))
    {
        cout<<-1<<endl;
        return 0;
    }
    cout<<n*m<<endl;
	return 0;
}
