#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  int ans;
  int NIL = -1;
  cin >> a >> b;
  ans = a * b;
  if (ans >= 10) {
    cout << NIL;
  } else {
    cout << ans;
  }
  return 0;
}
