#include <bits/stdc++.h>
using namespace std;

int main() {
  int A,B;
  cin >>A>>B;
  bool pos = true;
  if(A>9||B>9){
    pos = false;
  }
  if(pos){
    cout<<A*B<<endl;
  }else{
    cout<<-1<<endl;
  
}