#include <bits/stsdc++.h>
using namespace std;
int check(int v) {
	return v >= 1 && v <= 9;
}
int main() {
	int a, b;
	cin >> a >> b;
	if(check(a) && check(b)) cout << (a*b) << endl;
	else cout << "-1" << endl;
	return 0;
}