#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <stack>
#include <bitset>

#define rep(i,n) for (int (i) = 0; (i) < (n); i++)
#define rep1(i,n) for (int (i) = 1; (i) <= (n); i++)
typedef long long int llint;

using namespace std;

const llint inf = 1 << 29 ;

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