Problem: Convexity of a set of points on the plane is the size of the largest subset of points that form a convex polygon. Your task is to build a set of n points with the convexity of exactly m. Your set of points should not contain three points that lie on a straight line.

Input

The single line contains two integers n and m (3 ≤ m ≤ 100, m ≤ n ≤ 2m).

Output

If there is no solution, print "-1". Otherwise, print n pairs of integers — the coordinates of points of any set with the convexity of m. The coordinates shouldn't exceed 108 in their absolute value.

Examples

Input

4 3


Output

0 0
3 0
0 3
1 1


Input

6 3


Output

-1


Input

6 6


Output

10 0
-10 0
10 1
9 1
9 -1
0 -2


Input

7 4


Output

176166 6377
709276 539564
654734 174109
910147 434207
790497 366519
606663 21061
859328 886001

Solution (in JAVA):

Solution:
import java.awt.Point;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Solver {

	public static void main(String[] Args) throws NumberFormatException,
			IOException {
		new Solver().Run();
	}

	PrintWriter pw;
	StringTokenizer Stok;
	BufferedReader br;

	public String nextToken() throws IOException {
		while (Stok == null || !Stok.hasMoreTokens()) {
			Stok = new StringTokenizer(br.readLine());
		}
		return Stok.nextToken();
	}

	public int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	public double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	public long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(nextToken());
	}

	int kolPoint;
	int resKol;
	Point[] pnts;
	final int Max=(int)1e7;
	
	public void writing(){
		if (resKol==3)
		{
			if (kolPoint>=5)
			{
				pw.println(-1);
				return;
			}
			if (kolPoint==4){
				pnts[3]=new Point(10,0);
			}
			for (int i=0; i<kolPoint; i++){
				pw.print(pnts[i].x);
				pw.print(' ');
				pw.println(pnts[i].y);
			}
			return;
		}
		
		pnts[3]=new Point(-Max,Max);
		int curInd=3;
		curInd-=Math.max(0, resKol+2-kolPoint);
		int curX=Max;
		int curY=-Max;
		int addY=3;
		for (int i=0; i<resKol-2; i++){
			curInd++;
			curX--;
			curY+=addY;
			addY++;
			pnts[curInd]=new Point(curX, curY);
		}
		
		curX=-Max;
		curY=-Max;
		addY=3;
		for (int i=0; i<kolPoint-resKol-2; i++){
			curInd++;
			curX++;
			curY+=addY;
			addY++;
			pnts[curInd]=new Point(curX, curY);
		}
		
		for (int i=0; i<kolPoint; i++){
			pw.print(pnts[i].x);
			pw.print(' ');
			pw.println(pnts[i].y);
		}
	}
	
	public void Run() throws NumberFormatException, IOException {
		//br = new BufferedReader(new FileReader("input.txt")); pw = new PrintWriter("output.txt");
		br=new BufferedReader(new InputStreamReader(System.in));  pw=new PrintWriter(new OutputStreamWriter(System.out));
		kolPoint=nextInt();
		resKol=nextInt();
		pnts=new Point[kolPoint];
		pnts[0]=new Point(Max,Max);
		pnts[1]=new Point(Max, -Max);
		pnts[2]=new Point(-Max, -Max);
		writing();
		pw.flush();
		pw.close();
	}

}