#include<bits/stdc++.h>
#include<math.h>
const double PI = acos(-1);
using namespace std;
int main()
{
  long int n,a;
  cin>>n>>a;
  int flag=0;
  if((n>=1 && n<=9) && (a>=1 && a<=9))
  cout<<a*b;
  else
  cout<<"-1";

    
}