#include <bits/stdc++.h>

using namespace std;

int A,B,WA;

int main() {
    cin>>A>>B;
    WA=-1
    {if ((A<10) && (B<10) && (A>0) && (B>0))
    cout<<A*B<<endl;
    else
    cout<<WA<<endl;
    }
}