shared void main(){
  assert(exists t=process.readLine());
  value u=t.split().iterator();
  assert(exists a=parseInteger(u.next().string));
  assert(exists b=parseInteger(u.next().string));
  if(a<=9 && b<=9){
    print(a*b);
  }
  else{
    print(-1);
  }
}