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.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.TreeSet;

public class C {

	static HashMap<Long, Integer> toSmallMap = new HashMap<Long, Integer>();
	static HashMap<Integer, Long> toBigMap = new HashMap<Integer, Long>();
	
	static int N;
	static seg ar[];
	static TreeSet<Long> vals;
	public static void main(String[] args) {
		JS in = new JS();
		PrintWriter out = new PrintWriter(System.out);
		N = in.nextInt();
		vals = new TreeSet<Long>();
		ar = new seg[N];
		for(int i = 0; i < N; i++) {
			long l = in.nextLong();
			long r = in.nextLong();
			seg s = new seg(l, r);
			vals.add(l);
			vals.add(r);
			ar[i] = s;
		}
		int cnt = 0;
		for(long v : vals) {
			toSmallMap.put(v, cnt);
			toBigMap.put(cnt, v);
			//System.out.println(v+" -> "+cnt);
			cnt++;
		}
		
		int st[] = new int[cnt+1];
		int en[] = new int[cnt+1];
		long res[] = new long[N+1];
		for(int i = 0; i < N; i++) {
			st[toSmallMap.get(ar[i].l)]++;
			en[toSmallMap.get(ar[i].r)]++;
		}
		
		int cur = 0;

		for(int i = 0; i < cnt; i++) {
			cur += st[i];
			res[cur]++;
			cur -= en[i];
			
			if(i != cnt-1) {
				long btw = toBigMap.get(i+1)-toBigMap.get(i)-1;
				res[cur]+=btw;
			}			
		}
		for(int i = 1; i <= N; i++) {
			out.print(res[i]+" ");
		}out.println();
		out.close();
	}
	
	static class seg implements Comparable<seg>{
		long l, r;
		public seg(long ll, long rr) {
			l=ll;
			r=rr;
		}
		@Override
		public int compareTo(seg o) {
			if(l == o.l) {
				if(r == o.r) return 0;
				if(r < o.r) return 1;
				return -1;
			}
			if(l < o.l) return -1;
			else return 1;
		}
	}
	
	
	static class SegTree{
		long[] val, add;
		int n, len;
		public SegTree(int n) {
			len = Integer.highestOneBit(n)*4+1;
			if(Integer.bitCount(n)==1) len = n*2+1;
			this.n = (len-1)/2;
			val = new long[len];
			add = new long[len];
		}
		void rangeAdd(int l, int r, long val) {
			rangeUpdate(1, 0, n-1, l, r, val, 0);
		}
		void rangeUpdate(int i, int lr, int rr, int left, int right, long value, int type) {
			if(lr == left && rr == right) {
				if(type==0) setAdd(i, value);
			}
			else {
				prop(i);
				int mid = (lr+rr)/2;
				if(left <= mid) rangeUpdate(i*2, lr, mid, left, Math.min(mid, right),value,type);
				if(mid < right) rangeUpdate(i*2+1,mid+1, rr, Math.max(mid+1, left), right, value,type);
			}
		}
		void setAdd(int i, long value) {
			add[i] += value;
			if(i*2+1 >= len) {
				val[i]+=add[i];
				add[i]=0;
			}
		}

		void prop(int i) {
			setAdd(i*2, add[i]);
			setAdd(i*2+1, add[i]);
			add[i]=0;
		}
		long pointQuery(int i) {
			return pointQuery(1, 0, n-1, i, i);
		}
		long pointQuery(int i, int lr, int rr, int left, int right) {
			if(lr==left&&rr==right) {
				return val[i];
			}
			else {
				prop(i);
				int mid = (lr+rr)/2;
				if(left <= mid) return pointQuery(i*2, lr, mid, left, Math.min(mid, right));
				else return pointQuery(i*2+1,mid+1, rr, Math.max(mid+1, left), right);
			}
		}
	}
	
	static class JS{
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;
		
		public JS() {
			in = new BufferedInputStream(System.in, BS);
		}
		
		public JS(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}
		
		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}				
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}
		
		public int nextInt() {
			return (int)nextLong();
		}
		
		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}
		
		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}
		
		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}
		
		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
	}
}
