#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#define ll long long
const int MOD = 1e9+7;
using namespace std;


int main(){
	int x, y;
	cin >> x >> y;
	if (x < 10 && y < 10){
		cout << x*y << endl;
	}else{
		cout << -1 << endl;
	return 0;
}