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

int main() {
  cin >> a >> b;
  if(a > 0 && a < 10){
  	if(b > 0 && b < 10){
      cout << a * b << endl;
  	}
    else{
    	cout << -1 << endl; 
    }
  }
  else{
  cout << -1 << endl;
  }
}
