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

#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;

int main(){
	int a,b;
	cin>>a>>b;

	if(a>=10 || b>=10){
		cout<<-1<<enmdl;
	}else{
		cout<<a*b<<endl;
	}

	return 0;
}
