#include <bits/stdc++.h>
#define rep(i,a,b) for(int i = a; i < b; ++i)
#define all(c) c.begin(), c.end()
#define gmax(x,y) x=max(x,y)
#define gmin(x,y) x=min(x,y)
#define gadd(x,y) x=add(x,y)
#define gmul(x,y) x=mul(x,y)
using namespace std;

typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;


struct comp {
	bool operator()(const pii &a, const pii &b) const{
		return a.first + a.second < b.first + b.second;
	}
};

int main(){
	cin.tie(0);
	cout.tie(0);
	ios_base::sync_with_stdio(0);
	int n,k;
	cin >> n >> k;
	--k;
	vector<bool> taken(2*n);
	vector<pii> res;
	int _tar = 2*n + 1 + n/2;
	int _l = 1 + n/2;
	int l=_l,tar=2*n;
	while(l >= 1){
		res.emplace_back(l,tar);	
		--l,--tar;
	}
	rep(i,_l+1,n+1){
		res.emplace_back(i,i + n - _l);
	}
	sort(all(res), comp());
	rep(i,0,n){
		if(res[i].first + res[i].second + 2*k > i + 2*n + 1 + k){
			cout << -1 << '\n';
			return 0;
		}
	}
	rep(i,0,n){
		cout << res[i].first + k << ' ' << res[i].second + k << ' ' << 2*n + 1 + k + i<< '\n';
	}
}

### Prompt

Develop a solution in CPP to the problem described below:

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>
#define rep(i,a,b) for(int i = a; i < b; ++i)
#define all(c) c.begin(), c.end()
#define gmax(x,y) x=max(x,y)
#define gmin(x,y) x=min(x,y)
#define gadd(x,y) x=add(x,y)
#define gmul(x,y) x=mul(x,y)
using namespace std;

typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;


struct comp {
	bool operator()(const pii &a, const pii &b) const{
		return a.first + a.second < b.first + b.second;
	}
};

int main(){
	cin.tie(0);
	cout.tie(0);
	ios_base::sync_with_stdio(0);
	int n,k;
	cin >> n >> k;
	--k;
	vector<bool> taken(2*n);
	vector<pii> res;
	int _tar = 2*n + 1 + n/2;
	int _l = 1 + n/2;
	int l=_l,tar=2*n;
	while(l >= 1){
		res.emplace_back(l,tar);	
		--l,--tar;
	}
	rep(i,_l+1,n+1){
		res.emplace_back(i,i + n - _l);
	}
	sort(all(res), comp());
	rep(i,0,n){
		if(res[i].first + res[i].second + 2*k > i + 2*n + 1 + k){
			cout << -1 << '\n';
			return 0;
		}
	}
	rep(i,0,n){
		cout << res[i].first + k << ' ' << res[i].second + k << ' ' << 2*n + 1 + k + i<< '\n';
	}
}

```