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 org.omg.CORBA.INTERNAL;

import java.io.*;
import java.lang.reflect.Array;
import java.security.acl.LastOwnerException;
import java.util.*;

/*

3
1 3
3 8
0 3


*/
public class CodeForces {
    static class Node{
        long value;
        int count;
        Node(long value,int count){
            this.value=value;
            this.count=count;
        }
    }
    public static int binaryserch(TreeSet<Long> set ){
        int left=0;
        int right=set.size()-1;
        while (left<=right){
            int mid=(left+right)/2;

        }
        return 0;
    }
    public static void main(String[] args) {
        FastReader s=new FastReader(System.in);
        int n=s.nextInt();
        HashMap<Long,Integer> map=new HashMap<>();
        for(int i=0;i<n;i++){
            long left=s.nextLong();
            long right=s.nextLong();
            if(map.containsKey(left)){
                map.replace(left,map.get(left)+1);
            }else {
                map.put(left,1);
            }
            if(map.containsKey(right+1)){
                map.replace(right+1,map.get(right+1)-1);
            }else {
                map.put(right+1,-1);
            }
        }
        ArrayList<Node> list=new ArrayList<>();
        for(Map.Entry<Long,Integer> entry:map.entrySet()){
            list.add(new Node(entry.getKey(),entry.getValue()));
        }
        Collections.sort(list, new Comparator<Node>() {
            @Override
            public int compare(Node o1, Node o2) {
                return Long.compare(o1.value,o2.value);
            }
        });
        for(int i=1;i<list.size();i++){
            list.get(i).count+=list.get(i-1).count;
        }
        long[] count=new long[n+1];
        for(int i=1;i<list.size();i++){
           count[list.get(i-1).count]+=( list.get(i).value-list.get(i-1).value);
        }
        for(int i=1;i<=n;i++){
            System.out.print(count[i]+" ");
        }
        System.out.println();
    }


    static class FastReader {
        InputStream is;
        private byte[] inbuf = new byte[1024];
        private int lenbuf = 0, ptrbuf = 0;
        static final int ints[] = new int[128];

        public FastReader(InputStream is) {
            for (int i = '0'; i <= '9'; i++) ints[i] = i - '0';
            this.is = is;
        }

        public 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++];
        }

        public boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        public int skip() {
            int b;
            while ((b = readByte()) != -1 && isSpaceChar(b)) ;
            return b;
        }

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

        public int nextInt() {
            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 << 3) + (num << 1) + ints[b];
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public long nextLong() {
            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 << 3) + (num << 1) + ints[b];
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }
       /* public char nextChar() {
            return (char)skip();
        }*/

        public char[] next(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 buff[] = new char[1005];
        public char[] nextCharArray(){
            int b = skip(), p = 0;
            while(!(isSpaceChar(b))){
                buff[p++] = (char)b;
                b = readByte();
            }
            return Arrays.copyOf(buff, p);
        }*/
    }
}

