#include <bits/stdc++.h>
#define Mod 1000000007
#define eps 1e-6
#define ll long long
#define INF 0x3f3f3f3f
#define MEM(x, y) memset(x, y, sizeof(x))
#define Maxn 1000000 + 10
using namespace std;
int N;
int len[Maxn];
int result = 0;
int main()
{
    int a,b;
    cin>>a>>b;
    if(a>9||b>9)
    cout<<-1<<endl;
    else
    {
        cout<<a*b<<endl;
    }
    
}
