#include <bits/stdc++.h>

using namespace std;
#define endl "\n"

const int MOD = 1000000007;



int main()
{
	ios::sync_with_stdio(0);cin.tie(0);
    int a, b
    cin >> a >> b;
    if(a > 9 || b > 9)cout << "-1" << endl;
    else cout << a*b << endl;
    
    
    
    
    
	return 0;
}