#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <vector>
#include <string>
using namespace std;

int main() {
  int a;
  int b;
  int ans;
  cin >> a >> b;
  int ans=a*b;

  if(a>9 or b>10) ans=-1;

  cout << ans << endl;

  return 0;
}