Problem: Snow Queen told Kay to form a word "eternity" using pieces of ice. Kay is eager to deal with the task, because he will then become free, and Snow Queen will give him all the world and a pair of skates.

Behind the palace of the Snow Queen there is an infinite field consisting of cells. There are n pieces of ice spread over the field, each piece occupying exactly one cell and no two pieces occupying the same cell. To estimate the difficulty of the task Kay looks at some squares of size k × k cells, with corners located at the corners of the cells and sides parallel to coordinate axis and counts the number of pieces of the ice inside them.

This method gives an estimation of the difficulty of some part of the field. However, Kay also wants to estimate the total difficulty, so he came up with the following criteria: for each x (1 ≤ x ≤ n) he wants to count the number of squares of size k × k, such that there are exactly x pieces of the ice inside.

Please, help Kay estimate the difficulty of the task given by the Snow Queen.

Input

The first line of the input contains two integers n and k (1 ≤ n ≤ 100 000, 1 ≤ k ≤ 300) — the number of pieces of the ice and the value k, respectively. Each of the next n lines contains two integers xi and yi ( - 109 ≤ xi, yi ≤ 109) — coordinates of the cell containing i-th piece of the ice. It's guaranteed, that no two pieces of the ice occupy the same cell.

Output

Print n integers: the number of squares of size k × k containing exactly 1, 2, ..., n pieces of the ice.

Example

Input

5 3
4 5
4 6
5 5
5 6
7 7


Output

10 8 1 4 0 

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n, k;


//        n = (int) 1e5;
//        k = 300;
            n = in.readInt();
            k = in.readInt();
            TaskD.Event[] events = new TaskD.Event[2 * n];

            TaskD.Segment[] segments = new TaskD.Segment[n];
            for (int i = 0; i < n; i++) {
//            int x = rnd.nextInt((int) 1e2);
//            int y = rnd.nextInt((int) 1e2);
                int x = in.readInt();
                int y = in.readInt();
                events[i] = new TaskD.Event(x - k + 1, true, y - k + 1, y);
                events[i + n] = new TaskD.Event(x + 1, false, y - k + 1, y);
                segments[i] = new TaskD.Segment(y - k + 1, y);
            }
            Arrays.sort(events, (a, b) -> Integer.compare(a.x, b.x));
            Arrays.sort(segments, (a, b) -> Integer.compare(a.l, b.l));

            int sz = 0;
            int[] lastUsed = new int[n * k];
            for (int i = 0; i < n; i++) {
                TaskD.Segment segment = segments[i];
                if (i != 0) {
                    segment.l = Math.max(segment.l, segments[i - 1].r + 1);
                }
                for (int y = segment.l; y <= segment.r; y++) {
                    lastUsed[sz++] = y;
                }
            }


            for (TaskD.Event event : events) {
                event.cyl = Arrays.binarySearch(lastUsed, 0, sz, event.cyl);
                event.cyr = Arrays.binarySearch(lastUsed, 0, sz, event.cyr);
            }

            final int inf = Integer.MAX_VALUE;
            Arrays.fill(lastUsed, inf);
            long[] ans = new long[n + 1];
            short[] cntPoints = new short[n * k];

            for (TaskD.Event event : events) {
                for (int yy = event.cyl; yy <= event.cyr; yy++) {
                    if (lastUsed[yy] != inf) {
                        ans[cntPoints[yy]] += event.x - lastUsed[yy];
                    }

                    if (event.add) {
                        ++cntPoints[yy];
                    } else {
                        --cntPoints[yy];
                    }

                    lastUsed[yy] = event.x;
                }
            }
//        out.printLine("cntPoints: ", Arrays.toString(cntPoints));

            for (int cnt = 1; cnt <= n; cnt++) {
                if (cnt != 1) {
                    out.print(" ");
                }
                if (cnt < ans.length) {
                    out.print(ans[cnt]);
                } else {
                    out.print("0");
                }
            }

            out.printLine();
        }

        static class Event {
            int x;
            boolean add;
            int cyl;
            int cyr;

            public Event(int x, boolean add, int cyl, int cyr) {
                this.x = x;
                this.add = add;
                this.cyl = cyl;
                this.cyr = cyr;
            }

        }

        static class Segment {
            int l;
            int r;

            public Segment(int l, int r) {
                this.l = l;
                this.r = r;
            }

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine() {
            writer.println();
        }

        public void close() {
            writer.close();
        }

        public void print(long i) {
            writer.print(i);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}