#include<iostream>
using namespace std;
 
int main(){
  int a,b;
  cin>>a>>b;
  if(a<=9 && a>=1){
    if(b>=1 && b<=9){
		cout<<a*b;
  	}
    else{
      count<<"-1";
    }
  }
  else{
    count<<"-1";
  }
  return 0;
}