b#include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <tuple>
#include <stdlib.h>
using namespace std;
typedef long long int ll;

int main()
{
	int a, b, c;
	string s;
	cin >> a >> b;
	if(a<10&&b<10)cout << a*b;
	else cout << -1;
}
