#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;

int main(){
	int a;
	int b;
	cin >> a;
	cin >> b;
	if ((a<=9)&&(a>=1))&&((b<=9)&&(b>=1)){
		cout << a*b;
	}
	else {
		cout << -1;
	}
}