#include "bits/stdc++.h"
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef pair<ll, ll> PP;
#define rep(i,n) for(ll i = 0; i < ll(n); i++)
#define all(v) v.begin() , v.end()
#define inputv(v,n) rep(i,n){\
    ll x;\
    cin>>x;\
    v.push_back(x);\
    }
const ll INF = 999999999999999;
const ll MOD = 998244353;
ll a, b, c, d, e, f, p, t, x, y, z, q, m, n, r, h, k, ans = 0, w, l;
vl A, B, C;
void input() {
	cin >> n >> k;
}
void solve() {
	a = (2 * k + 3 * n - 1) * (3 * n) / 2;
	b = (2 * k + 2 * n - 1) * (2 * n) / 2;
	if (b * 2 > a) {
		cout << -1 << endl;
		return;
	}

	A = vl(n);
	B = vl(n);
	C = vl(n);

	x = k;
	y = k + n;
	z = k + 2 * n;
	rep(i, n) {
		C[i] = z + i;
	}
	rep(i, (n+1) / 2) {
		A[i * 2] = x;
		x++;
	}

	rep(i, n / 2) {
		B[i * 2 + 1] = y;
		y++;
	}

	rep(i, (n + 1) / 2) {
		B[i * 2] = y;
		y++;
	}

	rep(i, n / 2) {
		A[i * 2 + 1] = x;
		x++;
	}

	rep(i, n) {
		cout << A[i] << " " << B[i] << " " << C[i] << endl;
	}
}

int main() {
	input();
	solve();
}
### Prompt

Your challenge is to write a cpp solution to the following problem:

Given are positive integers N and K.

Determine if the 3N integers K, K+1, ..., K+3N-1 can be partitioned into N triples (a_1,b_1,c_1), ..., (a_N,b_N,c_N) so that the condition below is satisfied. Any of the integers K, K+1, ..., K+3N-1 must appear in exactly one of those triples.

* For every integer i from 1 to N, a_i + b_i \leq c_i holds.



If the answer is yes, construct one such partition.

Constraints

* 1 \leq N \leq 10^5
* 1 \leq K \leq 10^9

Input

Input is given from Standard Input in the following format:


N K


Output

If it is impossible to partition the integers satisfying the condition, print `-1`. If it is possible, print N triples in the following format:


a_1 b_1 c_1
:
a_N b_N c_N

Output

If it is impossible to partition the integers satisfying the condition, print `-1`. If it is possible, print N triples in the following format:


a_1 b_1 c_1
:
a_N b_N c_N

Examples

Input

1 1


Output

1 2 3


Input

3 3


Output

-1

### Response

```cpp
#include "bits/stdc++.h"
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef pair<ll, ll> PP;
#define rep(i,n) for(ll i = 0; i < ll(n); i++)
#define all(v) v.begin() , v.end()
#define inputv(v,n) rep(i,n){\
    ll x;\
    cin>>x;\
    v.push_back(x);\
    }
const ll INF = 999999999999999;
const ll MOD = 998244353;
ll a, b, c, d, e, f, p, t, x, y, z, q, m, n, r, h, k, ans = 0, w, l;
vl A, B, C;
void input() {
	cin >> n >> k;
}
void solve() {
	a = (2 * k + 3 * n - 1) * (3 * n) / 2;
	b = (2 * k + 2 * n - 1) * (2 * n) / 2;
	if (b * 2 > a) {
		cout << -1 << endl;
		return;
	}

	A = vl(n);
	B = vl(n);
	C = vl(n);

	x = k;
	y = k + n;
	z = k + 2 * n;
	rep(i, n) {
		C[i] = z + i;
	}
	rep(i, (n+1) / 2) {
		A[i * 2] = x;
		x++;
	}

	rep(i, n / 2) {
		B[i * 2 + 1] = y;
		y++;
	}

	rep(i, (n + 1) / 2) {
		B[i * 2] = y;
		y++;
	}

	rep(i, n / 2) {
		A[i * 2 + 1] = x;
		x++;
	}

	rep(i, n) {
		cout << A[i] << " " << B[i] << " " << C[i] << endl;
	}
}

int main() {
	input();
	solve();
}
```