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

const bool DEBUG = false;

int main(int argc, char const *argv[]) {
  int A, B;
  cin >> A >> B;
  if (A > 9) {
    cout << "-1" << endl;
    return 0
  }
  if (B > 9) {
    cout << "-1" << endl;
    return 0;
  }
  cout << A * B << endl;

  return 0;
}
