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.
//package com.swiggy.dijkstra;

import java.io.*;
import java.util.*;

public class ModifyLongest {
    InputStream is;
    PrintWriter out;
    String INPUT = "";
    //boolean codechef=true;
    boolean codechef=true;


    void solve()
    {
        int n=ni();
        long[] l=new long[n];
        long[] r=new long[n];
        ArrayList<Temp> list=new ArrayList<>();
        for(int i=0;i<n;i++)
        {
            l[i]=nl();
            r[i]=nl();
            Temp tp=new Temp();
            tp.ind=l[i];
            tp.cnt=1;
            list.add(tp);

            Temp tp2=new Temp();
            tp2.ind=r[i]+1;
            tp2.cnt=-1;
            list.add(tp2);
        }

        list.sort(new Comparator<Temp>() {
            @Override
            public int compare(Temp o1, Temp o2) {
                long v=o1.ind-o2.ind;
                if(v>0)return 1;
                else if(v<0)return -1;
                return 0;
            }
        });
        int prevCnt=-1;
        for(Temp tp:list)
        {
            if(prevCnt!=-1)
            {
                tp.cnt+=prevCnt;
            }
            prevCnt=tp.cnt;
        }

        long[] ans=new long[n+1];
        prevCnt=-1;
        long prevInd=0;
        for(Temp tp:list)
        {
            if(prevCnt!=-1)
            {
                ans[prevCnt]+=tp.ind-prevInd;
            }
            prevCnt=tp.cnt;
            prevInd=tp.ind;
        }

        Temp last=list.get(list.size()-1);
        ans[last.cnt]++;

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

    }

    static class Temp
    {
        long ind;
        int cnt;
    }

    static int ans;

    static int comp(int u,boolean[] vis,Edge[][] g)
    {
        vis[u]=true;
        int sum=0;
        for(Edge ed:g[u])
        {
            int end=ed.end;
            if(!vis[end])
            {
                int val=comp(ed.end,vis,g);
                if(val%2==0)
                {
                    ans++;
                }
                else sum+=val;
            }
        }
        return sum+1;
    }


    static class Edge
    {
        int end;
        int odd;
        int sum;
    }


    static int[][] packD(int[] from,int[] to,int n)
    {
        int len=from.length;
        int[] cnt=new int[n];
        for(int i=0;i<len;i++)
        {
            cnt[from[i]]++;
        }
        int[][] graph=new int[n][];
        for(int i=0;i<n;i++)
        {
            graph[i]=new int[cnt[i]];
        }
        int[] ind=new int[n];
        for(int i=0;i<len;i++)
        {
            graph[from[i]][ind[from[i]]++]=to[i];
        }
        return graph;
    }



    static HashMap<Integer,Integer> map;

    static void rev(char[] arr,int st,int end)
    {
        int len=(end-st+1);
        for(int i=st;i<st+len/2;i++)
        {
            char tmp=arr[i];
            arr[i]=arr[end];
            arr[end]=tmp;
            end--;
        }
    }

    static long fnc(int a,int b)
    {
        long val=Math.min(a,b)*1000000007;
        val+=Math.max(a,b);
        return val;
    }

    static long fnc2(int a,int b)
    {
        long val=a*1000000007;
        val+=b;
        return val;
    }

    static class Pair
    {
        int a,b;
        public Pair(int a,int b)
        {
            this.a=a;
            this.b=b;
        }
    }

    static int bit[];

    static void add(int x,int d,int n)
    {
        for(int i=x;i<=n;i+=i&-i)bit[i]+=d;
    }

    static int query(int x)
    {
        int ret=0;
        for(int i=x;i>0;i-=i&-i)
            ret+=bit[i];
        return ret;
    }

    static long lcm(int a,int b)
    {
        long val=a;
        val*=b;
        return (val/gcd(a,b));
    }

    static int gcd(int a,int b)
    {
        if(a==0)return b;
        return gcd(b%a,a);
    }

    static int pow(int a, int b, int p)
    {
        long ans = 1, base = a;
        while (b!=0)
        {
            if ((b & 1)!=0)
            {
                ans *= base;
                ans%= p;
            }
            base *= base;
            base%= p;
            b >>= 1;
        }
        return (int)ans;
    }

    static int inv(int x, int p)
    {
        return pow(x, p - 2, p);
    }


    void run() throws Exception
    {
        if(codechef)oj=true;
        is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);

        long s = System.currentTimeMillis();
        solve();
        out.flush();
        tr(System.currentTimeMillis()-s+"ms");
    }

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

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte()
    {
        if(lenbuf == -1)throw new InputMismatchException();
        if(ptrbuf >= lenbuf){
            ptrbuf = 0;
            try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
            if(lenbuf <= 0)return -1;
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
    private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

    private double nd() { return Double.parseDouble(ns()); }
    private char nc() { return (char)skip(); }

    private String ns()
    {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n)
    {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while(p < n && !(isSpaceChar(b))){
            buf[p++] = (char)b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private char[][] nm(int n, int m)
    {
        char[][] map = new char[n][];
        for(int i = 0;i < n;i++)map[i] = ns(m);
        return map;
    }

    private int[] na(int n)
    {
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = ni();
        return a;
    }

    private int ni()
    {
        int num = 0, b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl()
    {
        long num = 0;
        int b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
    private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}