#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
int64 max(int64 a, int64 b) {
  if (b > a)
    return b;
  else
    return a;
}
int64 min(int64 a, int64 b) {
  if (b < a)
    return b;
  else
    return a;
}
signed main() {
  int64 A, B;
  if (A < 10 && B < 10)
    cout << A * B;
  else
    cout << -1;
  return 0;
}
