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

#define F first
#define S second
#define PB push_back
#define MP make_pair
#define mod 1000000007;

typedef long long ll; 
typedef pair<int, int> ii; 
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

// Print fn to print array

int main(){
	int n,m;
	cin >> n >> m;
	if(n<=9 && m<=9){
		cout << n*m << endl;
	}
	else out << -1 << endl;
	return 0;
}