#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int x, y;
  cin >> x >> y;
  if (x < 10 || y < 10) {
    cout << x * y << "\n";
    cout << -1 << "\n";
    return 0;
  }
  cout << -1 << "\n";
  return 0;
}
