#include<bits/stdc++.h>
using namespace std;
#define max1 1000005
#define sz1 100001
#define mod 1000000007
#define moda 421412341324321ll
#define inf 1e18
#define ll long long int
#define debug(x) cout<<#x<<" "<<x<<endl
typedef pair<ll,ll> pr;
#define rte cout<<"Correct";exit(0);
int intlog(double x) {
    return (int)(log(x) / log(2));
}
double max(double x,double y)
{
    if(x>=y)
    {
        return x;
    }
    else
    {
        return y;
    }
}
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  #ifndef ONLINE_JUDGE
  freopen("input.txt","r",stdin);
  freopen("output.txt","w",stdout);
  #endif
  cin>>l>>r;
  if(l>=1&&l<=9)
  {
    if(r>=1&&r<=9)
    {
        cout<<l*r;
        return 0;
    }
  }
  cout<<-1<<endl;
} 