#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b;
  cin >> a >> b;
  for (int i = 1; i < 10; i++) {
    for (int j = 1; j < 10; j++) {
      if (a * b == i * j) {
        cout << a * b << endl;
      } else {
        cout << -1 << endl;
      }
    }
  }
}
