You are given n segments on a coordinate line; each endpoint of every segment has integer coordinates. Some segments can degenerate to points. Segments can intersect with each other, be nested in each other or even coincide.

Your task is the following: for every k ∈ [1..n], calculate the number of points with integer coordinates such that the number of segments that cover these points equals k. A segment with endpoints l_i and r_i covers point x if and only if l_i ≤ x ≤ r_i.

Input

The first line of the input contains one integer n (1 ≤ n ≤ 2 ⋅ 10^5) — the number of segments.

The next n lines contain segments. The i-th line contains a pair of integers l_i, r_i (0 ≤ l_i ≤ r_i ≤ 10^{18}) — the endpoints of the i-th segment.

Output

Print n space separated integers cnt_1, cnt_2, ..., cnt_n, where cnt_i is equal to the number of points such that the number of segments that cover these points equals to i.

Examples

Input

3
0 3
1 3
3 8


Output

6 2 1 


Input

3
1 3
2 4
5 7


Output

5 2 0 

Note

The picture describing the first example:

<image>

Points with coordinates [0, 4, 5, 6, 7, 8] are covered by one segment, points [1, 2] are covered by two segments and point [3] is covered by three segments.

The picture describing the second example:

<image>

Points [1, 4, 5, 6, 7] are covered by one segment, points [2, 3] are covered by two segments and there are no points covered by three segments.
import java.io.BufferedReader;
// import java.io.FileInputStream;
// import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;

import static java.lang.Math.abs;
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.util.Arrays.copyOf;
import static java.util.Arrays.fill;
import static java.util.Arrays.sort;
// import static java.util.Collections.sort;
import static java.util.Comparator.comparingInt;

public class Main {
    FastScanner in;
    PrintWriter out;

    private void solve() throws IOException {
        // solveA();
        // solveB();
        solveC();
        // solveD();
        // solveE();
        // solveF();
    }

    private void solveA() throws IOException {
        int n = in.nextInt();
        TreeMap<String, Integer> map = new TreeMap<>();
        for (int i = 0; i < n; i++) {
            String s = in.next();
            map.put(s, map.getOrDefault(s, 0) + 1);
        }
        for (int i = 0; i < n; i++) {
            String s = in.next();
            map.put(s, map.getOrDefault(s, 0) - 1);
        }
        long ans = 0;
        for (String i : map.keySet())
            ans += abs(map.get(i));
        out.println(ans / 2);
    }

    private void solveB() throws IOException {
        int n = in.nextInt();
        long[] a = new long[n + 2];
        a[n + 1] = in.nextLong();
        for (int i = 0; i < n; i++)
            a[i + 1] = in.nextLong();
        n += 2;
        long[] sum = {0, 0};
        for (int i = 0; i < n - 1; i++)
            sum[i % 2] += a[i + 1] - a[i];
        long ans = sum[0];
        long[] cur = {0, 0};
        for (int i = 0; i < n - 1; i++) {
            sum[i % 2] -= a[i + 1] - a[i];
            if (a[i + 1] - a[i] > 1)
                ans = max(ans, cur[0] + (a[i + 1] - a[i] - 1) + sum[1]);
            cur[i % 2] += a[i + 1] - a[i];
        }
        out.println(ans);
    }

    class Pair implements Comparable<Pair> {
        long x;
        boolean end;

        Pair(long x, boolean end) {
            this.x = x;
            this.end = end;
        }

        public int compareTo(Pair o) {
            return x != o.x ? Long.compare(x, o.x) : Boolean.compare(end, o.end);
        }
    }

    private void solveC() throws IOException {
        int n = in.nextInt();
        Pair[] p = new Pair[n * 2];
        for (int i = 0; i < n; i++) {
            p[i * 2] = new Pair(in.nextLong(), false);
            p[i * 2 + 1] = new Pair(in.nextLong(), true);
        }
        shuffle(p);
        sort(p);

        int cnt = 0;
        long[] ans = new long[n + 1];
        for (int i = 0; i < n * 2; i++) {
            if (i > 0) {
                if (p[i - 1].x < p[i].x && !p[i - 1].end)
                    ans[cnt]++;
                if (p[i - 1].x + 1 <= p[i].x - 1)
                    ans[cnt] += p[i].x - p[i - 1].x - 1;
                if (p[i].end && ((p[i - 1].x == p[i].x && !p[i - 1].end) || (p[i - 1].x < p[i].x)))
                    ans[cnt]++;
            }


            if (p[i].end)
                cnt--;
            else
                cnt++;
        }
        if (!p[n * 2 - 1].end)
            ans[cnt]++;

        for (int i = 0; i < n; i++)
            out.print(ans[i + 1] + " ");
        out.println();
    }

    void shuffle(Pair[] a) {
        Pair b;
        Random r = new Random();
        for (int i = a.length - 1, j; i > 0; i--) {
            j = r.nextInt(i + 1);
            b = a[j];
            a[j] = a[i];
            a[i] = b;
        }
    }

    private void solveD() throws IOException {

    }

    private void solveE() throws IOException {

    }

    private void solveF() throws IOException {

    }

    class FastScanner {
        StringTokenizer st;
        BufferedReader br;

        FastScanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

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

        boolean hasNext() throws IOException {
            return br.ready() || (st != null && st.hasMoreTokens());
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(next().replace(',', '.'));
        }

        String nextLine() throws IOException {
            return br.readLine();
        }

        boolean hasNextLine() throws IOException {
            return br.ready();
        }
    }

    private void run() throws IOException {
        in = new FastScanner(System.in); // new FastScanner(new FileInputStream(".in"));
        out = new PrintWriter(System.out); // new PrintWriter(new FileOutputStream(".out"));

        solve();

        out.flush();
        out.close();
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }
}