#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  vector<int> V;
  vector<bool> Pr(10000001, true);
  int c = 0;
  for (int i = 2; i * i <= 10000001; i++) {
    if (Pr[i] == true) {
      for (int j = i * i; j <= 10000001; j = j + i) {
        Pr[j] = false;
      }
    }
  }
  for (int i = 2; i <= 10000001; i++) {
    if (Pr[i] == true) V.push_back(i);
  }
  int n, k;
  cin >> n >> k;
  int no = n / 2;
  k = k - n / 2;
  if (n < 2 && k > 0) {
    cout << "-1" << endl;
  } else if (n < 2 && k == 0) {
    cout << "1" << endl;
  } else if (k < 0) {
    cout << "-1" << endl;
  } else if (k == 0) {
    int j = 0;
    for (int i = 1; i <= (n / 2); i++) {
      if (Pr[V[j]] != false && Pr[V[j + 1]] != false) {
        cout << V[j] << " " << V[j + 1] << " ";
      } else
        i--;
      j = j + 2;
    }
    if (n % 2 == 1) {
      if (Pr[V[j + 1]] == false) {
        cout << V[j + 2] << endl;
      } else
        cout << V[j + 1] << endl;
    }
  } else {
    cout << (k + 1) << " " << 2 * (k + 1) << " ";
    if (k + 1 <= 10000001) Pr[k + 1] = false;
    if (2 * (k + 1) <= 10000001) Pr[2 * (k + 1)] = false;
    int j = 0;
    for (int i = 1; i <= (n / 2) - 1; i++) {
      if (Pr[V[j]] != false && Pr[V[j + 1]] != false) {
        cout << V[j] << " " << V[j + 1] << " ";
      } else
        i--;
      j = j + 2;
    }
    if (n % 2 == 1) {
      if (Pr[V[j + 1]] == false) {
        cout << V[j + 2] << endl;
      } else
        cout << V[j + 1] << endl;
    }
  }
}
