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.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
 
public class Main {
	public static void main(String[] args) {
		InputReader in = new InputReader();
		PrintWriter out = new PrintWriter(System.out);
		Thread th = new Thread(null, new Runnable(){public void run(){new Task1().solve(in, out);}},"Task1",1<<24);
		try{
			th.start();
			th.join();
		} catch(InterruptedException e){}
		out.close();
	}

	static class Task1{
		static final long MAX = (long)1e18+2;
		static final boolean debug = false;

		public void solve(InputReader in, PrintWriter out){
			int n = in.nextInt();
			TreeMap<Long, Integer> map = new TreeMap<Long, Integer>();

			for(int i=1; i<=n; i++){
				Long l = in.nextLong(), r = in.nextLong();
				if(map.containsKey(l)){
					map.put(l, map.get(l)+1);
				} else {
					map.put(l, 1);
				}
				if(map.containsKey(r+1)){
					map.put(r+1, map.get(r+1)-1);
				} else {
					map.put(r+1, -1);
				}
			}

			long[] ans = new long[n+1];
			int old = -1;
			Long old_key = -1L;
			for(Long key:map.keySet()){
				if(debug) out.println(key+" "+map.get(key));
				if(old_key==-1){
					old_key = key;
					old = map.get(old_key);
					continue;
				}
				int _new = map.get(key);
				ans[old] += key-old_key;

				old_key = key;
				old = _new+old;
			}

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

		public static int lowerBound(int[] array, int length, int value) {
	        int low = 0;
	        int high = length-1;
	        while (low < high) {
	            final int mid = (low + high) / 2;
	            if (value <= array[mid]) {
	                high = mid;
	            } else {
	                low = mid + 1;
	            }
	        }
	        return low;
	    }
		
		long gcd(long a, long b){
			while(a>0){
				long rem = b%a;
				b = a;
				a = rem;
			}
			return b;
		}
		long expo(long a, long b, long MOD){
			long result = 1;
			while (b>0){
				if (b%2==1) result=(result*a)%MOD;
				b>>=1;
				a=(a*a)%MOD;
			}
			return result%MOD;
		}
		long inverseModullo(long numerator, long denominator, long MOD){
			return ((numerator )*(expo(denominator, MOD-2, MOD))) ;
		}
	}
 	
	static class InputReader{
		final InputStream stream;
		final byte[] buf = new byte[8192];
		int curChar, numChars;
		SpaceCharFilter filter;
		public InputReader(){
			this.stream = System.in;
		}
		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 nextInt(){
			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 long nextLong(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			int sgn = 1;
			if(c == '-'){
				sgn = -1;
				c = read();
			}
			long 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 String next(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			StringBuilder res = new StringBuilder();
			do{
				res.appendCodePoint(c);
				c = read();
			}while(!isSpaceChar(c));
			return res.toString();
		}
		public boolean isSpaceChar(int c){
			if(filter != null) return filter.isSpaceChar(c);
			return c==' ' || c=='\n' || c=='\r' || c=='\t' || c==-1;
		}
		public interface SpaceCharFilter{
			public boolean isSpaceChar(int ch);
		}
	}
}