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.util.*;
import java.io.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

    final int XCOEFF = 15000;
    
    public void solve() throws Exception {
        int n = sc.nextInt(), m = sc.nextInt();
        if (m == 3 && n > 4) {
            out.println(-1);
            return;
        }
        long[] x = new long[2 * m], y = new long[2 * m];
        for (int i = 0; i < m; i++) {
            x[i] = i * XCOEFF;
            y[i] = i * (i + 1) / 2;
        }
        for (int i = 1; i < m - 1; i++) {
            long x2 = x[i] + 1;
            long y2 = y[i];
            x[m + i] = x2;
            y[m + i] = y2;
        }
        x[2 * m - 1] = -5000 * XCOEFF;
        y[2 * m - 1] = -5001;
        x[m] = (m - 1 + 5000) * XCOEFF;
        y[m] = y[m - 1] + (m - 1) * 5000 - 1;
        for (int i = 0; i < n; i++) {
            out.println(x[i] + " " + y[i]);
        }
        /*
        for (int i = 0; i < m; i++) {
            int prev = (i - 1 + m) % m;
            int next = (i + 1) % m;
            long x2 = x[m + i];
            long y2 = y[m + i];
            for (int j = 0; j < m; j++) {
                int j1 = (j + 1) % m;
                long v1x = x[j] - x2, v1y = y[j] - y2;
                long v2x = x[j1] - x2, v2y = y[j1] - y2;
                long cross = v1x * v2y - v1y * v2x;
                if (cross == 0) {
                    throw new Exception();
                } else if (cross <= 0 && !(j == i || j == prev)) {
                    throw new Exception();
                } else if (cross >= 0 && (j == i || j == prev)) {
                    throw new Exception();
                }
            }
        }
        */
        /*
        for (int i = 2; i < m - 2; i++) {
            long x2 = x[i] + 1;
            long y2 = y[i];
            long v1x = x[i + 1] - x2, v1y = y[i + 1] - y2;
            long v2x = x[i + 2] - x2, v2y = y[i + 2] - y2;
            long cross = v1x * v2y - v1y * v2x;
            long v3x = x[i - 2] - x2, v3y = y[i - 2] - y2;
            long v4x = x[i - 1] - x2, v4y = y[i - 1] - y2;
            long cross2 = v3x * v4y - v3y * v4x;
            out.println(cross + " " + cross2);
        }
        */
    }
    
    static Throwable uncaught;
    
    BufferedReader in;
    FastScanner sc;
    PrintWriter out;
    
    @Override
    public void run() {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            sc = new FastScanner(in);
            solve();
        } catch (Throwable uncaught) {
            Solution.uncaught = uncaught;
        } finally {
            out.close();
        }
    }
    
    public static void main(String[] args) throws Throwable {
        Thread thread = new Thread (null, new Solution(), "", (1 << 26));
        thread.start();
        thread.join();
        if (Solution.uncaught != null) {
            throw Solution.uncaught;
        }
    }

}

class FastScanner {
    
    BufferedReader in;
    StringTokenizer st;
    
    public FastScanner(BufferedReader in) {
        this.in = in;
    }
    
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }
    
    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
    
}