// Arup Guha
// 7/22/2022
// Solution to 2021 USACO December Silver Problem: Convoluted Intervals

import java.util.*;

public class convoluted {

	public static void main(String[] args) {
	
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		int max = stdin.nextInt();
		
		// Store how many ranges start and end at each unique point.
		long[] low = new long[max+1];
		long[] high = new long[max+1];
		for (int i=0; i<n; i++) {
			low[stdin.nextInt()]++;
			high[stdin.nextInt()]++;
		}
		
		long[] freq = new long[2*max+2];
		
		// freq[x] stores how many pairs of low frequencies add to x.
		for (int i=0; i<=max; i++) 
			for (int j=0; j<=max; j++) 
				freq[i+j] += (low[i]*low[j]);
		
		// Here I subtract from index x+1 for each high range that ends at x.
		for (int i=0; i<=max; i++) 
			for (int j=0; j<=max; j++) 
				freq[i+j+1] -= (high[i]*high[j]);
		
		// Make cumulative frequency.
		for (int i=1; i<freq.length; i++)
			freq[i] += freq[i-1];
		
		// Answers are stored here.
		StringBuffer sb = new StringBuffer();
		for (int i=0; i<=2*max; i++)
			sb.append(freq[i]+"\n");
		System.out.print(sb);
	}
}