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.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main
{
    static MyScanner scan;
    static PrintWriter pw;
    public static void main(String[] args) {
        new Thread(null,null,"_",1<<25)
        {
            public void run()
            {
                try
                {
                    solve();
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                    System.exit(1);
                }
            }
        }.start();
    }
    static void solve() throws IOException {
        scan = new MyScanner();
        pw = new PrintWriter(System.out, true);
        StringBuilder sb = new StringBuilder();
        int n = ni();
        long ans[] = new long[n+1];
        long l[] = new long[n];
        long r[] = new long[n];
        TreeSet<Long> ts = new TreeSet();
        Map<Long,Integer> compress = new HashMap<>();
        Map<Integer,Long> rev = new HashMap<>();
        Map<Long,Integer> howmanyintervalsendhere = new HashMap();
        for(int i=0;i<n;++i)
        {
            l[i] = nl();
            r[i] = nl();
            Integer val = howmanyintervalsendhere.get(r[i]);
            if(val==null)
                howmanyintervalsendhere.put(r[i],1);
            else howmanyintervalsendhere.put(r[i],val+1);
            ts.add(l[i]);
            ts.add(r[i]);
        }
        int idx = 0;
        for(long e:ts)
        {
            rev.put(idx,e);
            compress.put(e,idx);
            idx++;
        }
        int freq[] = new int[2*n+5];
        for(int i=0;i<n;++i)
        {
            ++freq[compress.get(l[i])];
            --freq[compress.get(r[i])+1];
        }
        for(int i=1;i<=2*n+4;++i)
            freq[i]+=freq[i-1];
//        for(int e:freq)
//            p(e);
//        pl();
        for(int i=0;i<=2*n;++i)
        {
            if(!rev.containsKey(i+1))
            {
                ans[freq[i]]++;
                break;
            }
            ans[freq[i]]++;
            Integer val = howmanyintervalsendhere.get(rev.get(i));
            if(val!=null)
              ans[freq[i]-val]+=rev.get(i+1)-rev.get(i)-1;
            else ans[freq[i]]+=rev.get(i+1)-rev.get(i)-1;
        }
        for(int i=1;i<=n;++i)
            sb.append(ans[i]+" ");
        psb(sb);
        pw.flush();
        pw.close();
    }
    static long MMI(long A,long MOD)
    {
        return modpow(A,MOD-2,MOD);
    }
    static long modpow(long x,long y,long MOD)
    {
        if(y==0)
            return 1;
        if((y&1)==0)
            return modpow((x*x)%MOD,y>>1,MOD);
        else return (x*modpow(x,y-1,MOD))%MOD;
    }
    static class Pair implements Comparable<Pair>
    {
        int x,y;
        Pair(int x,int y)
        {
            this.x=x;
            this.y=y;
        }
        public int compareTo(Pair other)
        {
            if(this.x!=other.x)
                return this.x-other.x;
            return this.y-other.y;
        }
        public String toString()
        {
            return "{"+x+","+y+"}";
        }
    }
    static int ni() throws IOException
    {
        return scan.nextInt();
    }
    static long nl() throws IOException
    {
        return scan.nextLong();
    }
    static double nd() throws IOException
    {
        return scan.nextDouble();
    }
    static String ne() throws IOException
    {
        return scan.next();
    }
    static String nel() throws IOException
    {
        return scan.nextLine();
    }
    static void pl()
    {
        pw.println();
    }
    static void p(Object o)
    {
        pw.print(o+" ");
    }
    static void pl(Object o)
    {
        pw.println(o);
    }
    static void psb(StringBuilder sb)
    {
        pw.print(sb);
    }
    static class MyScanner
    {
        BufferedReader br;
        StringTokenizer st;
        MyScanner()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        String nextLine()throws IOException
        {
            return br.readLine();
        }
        String next() throws IOException
        {
            if(st==null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        int nextInt() throws IOException
        {
            return Integer.parseInt(next());
        }
        long nextLong() throws IOException
        {
            return Long.parseLong(next());
        }
        double nextDouble() throws IOException
        {
            return Double.parseDouble(next());
        }
    }
}