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

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