#include<cstdio>
#include<algorithm>
using namespace std;
int seq[3][100005],n,k,i,tot=0,m;
int main()
{
	scanf("%d%d",&n,&m); 
	if(n%2==0)
	{
		for(i=n/2+1;i<=n;i++)
		{
			tot++;
			seq[0][tot]=i;seq[1][tot]=i+n/2;
			seq[2][tot]=2*n-1+2*tot;
		}
		for(i=1;i<=n/2;i++)
		{
			tot++;
			seq[0][tot]=i;seq[1][tot]=i+n+n/2;
			seq[2][tot]=2*n+2*(tot-n/2);
		}
	}
	else
	{
		k=n/2;
		for(i=k+1;i<=n;i++)
		{
			tot++;
			seq[0][tot]=i;seq[1][tot]=2*n+2-2*tot;
			seq[2][tot]=3*n+1-tot;
		}
		for(i=1;i<=k;i++)
		{
			tot++;
			seq[0][tot]=i;seq[1][tot]=2*n+1-2*(tot-k-1);
			seq[2][tot]=3*n+1-tot;
		}
	}
	if(2*m-1>n)
	{
		printf("-1\n");
		return 0;
	}
	for(i=1;i<=n;i++)printf("%d %d %d\n",m-1+seq[0][i],m-1+seq[1][i],m-1+seq[2][i]);
	return 0;
}
### Prompt

Please formulate 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<cstdio>
#include<algorithm>
using namespace std;
int seq[3][100005],n,k,i,tot=0,m;
int main()
{
	scanf("%d%d",&n,&m); 
	if(n%2==0)
	{
		for(i=n/2+1;i<=n;i++)
		{
			tot++;
			seq[0][tot]=i;seq[1][tot]=i+n/2;
			seq[2][tot]=2*n-1+2*tot;
		}
		for(i=1;i<=n/2;i++)
		{
			tot++;
			seq[0][tot]=i;seq[1][tot]=i+n+n/2;
			seq[2][tot]=2*n+2*(tot-n/2);
		}
	}
	else
	{
		k=n/2;
		for(i=k+1;i<=n;i++)
		{
			tot++;
			seq[0][tot]=i;seq[1][tot]=2*n+2-2*tot;
			seq[2][tot]=3*n+1-tot;
		}
		for(i=1;i<=k;i++)
		{
			tot++;
			seq[0][tot]=i;seq[1][tot]=2*n+1-2*(tot-k-1);
			seq[2][tot]=3*n+1-tot;
		}
	}
	if(2*m-1>n)
	{
		printf("-1\n");
		return 0;
	}
	for(i=1;i<=n;i++)printf("%d %d %d\n",m-1+seq[0][i],m-1+seq[1][i],m-1+seq[2][i]);
	return 0;
}
```