#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <numeric>
#include <math.h>
#include <set>
#include <bitset>
#include <stack>

using namespace std;

typedef long long ll;

const ll prime = 10000000000 + 7;

/*
vector<int> z_algorithm(const string& s) {
	vector<int> prefix(s.size());
	for (int i = 1, j = 0; i < s.size(); i++)
	{
		if (i + prefix[i - j] < j + prefix[j]) {
			prefix[i] = prefix[i - j];
		}
	}
}
*/

struct UnionFind {
	vector<ll> par;
	vector<ll> rank;

	UnionFind(ll n) {
		par = vector<ll>(n);
		rank = vector<ll>(n);
		for (ll i = 0; i < n; i++)
		{
			par[i] = i;
			rank[i] = 0;
		}
	}

	ll root(ll x) {
		if (par[x] == x) {
			return x;
		}
		else {
			return root(par[x]);
		}
	}

	bool is_same(ll x, ll y) {
		return (root(x) == root(y));
	}

	void connect(ll x, ll y) {
		if (!is_same(x, y)) {
			ll x1, y1;
			x1 = root(x);
			y1 = root(y);
			if (rank[x1] < rank[y1]) {
				par[x1] = y1;
			}
			else if (rank[x1] > rank[y1]) {
				par[y1] = x1;
			}
			else {
				par[x1] = y1;
				rank[y1]++;
			}
		}
	}
};

int main() {
  
  	cout << fixed << setprecision(10);

	ll a, b;
	cin >> a >> b;
	if (1 <= min(a, b) and max(a, b) <= 9) {
		cout << (a * b) << endl;
	}
	else {
		cout << -1 << endl;
	}

	return 0;
}
