#include<iostream>
using namespace std;
int main()
{
    int A,B,mult;
    cin>>A>>B;
    if(A<=9&&B<=9)
    {
        mult=A*B;
        cout<<mult<<endl;
    }
    else
        cout<<"-1"<<endl;
    return 0;
}