#include<bits/stdc++.h>
using namespace std;
vector<int>vec;
int main()
{

    int t,i,j,n,a,b;
    string s,s1
    cin>>a>>b;
    if((a>=0&&a<=9)&&(b>=0&&b<=9))
    cout<<a*b<<"\n";
    else
        cout<<"-1"<<"\n";



return 0;
}
