// Karm Karta ja, Phal Ki Chinta na Kar:)
#include <bits/stdc++.h>
using namespace std;
#include<stdio.h>
int main()
{
    ll a,b;
    cin>>a>>b;
    if(a>=1&&a<=9&&b>=1&&b<=9)
    {
        cout<<a*b;
    }
    else
    {
        cout<<-1;
    }
}

