#include <iostream>
#include <string>
#include <cmath>
#include<algorithm>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;



int main() {
	int A;
	int B;
	scanf_s("%d", &A);
	scanf_s("%d", &B);

	if (1 <= A <= 9 && 1 <= B <= 9) { printf("%d", A*B); }
	else { printf("%d", -1); }

	system("PAUSE");
}
