import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = Integer.parseInt(sc.nextLine());
int[] answer = new int[N+2];
int[][] board = new int[1001][1001];
for (int i = 0; i < N; i++) {
StringTokenizer st = new StringTokenizer(sc.nextLine(), " ");
int x1 = Integer.parseInt(st.nextToken());
int y1 = Integer.parseInt(st.nextToken());
int x2 = x1 + Integer.parseInt(st.nextToken());
int y2 = y1 + Integer.parseInt(st.nextToken());
for (int j = x1; j < x2; j++) {
for (int j2 = y1; j2 < y2; j2++) {
board[j][j2] = i+1;
}
}
}
for (int i = 0; i < board.length; i++) {
for (int j = 0; j < board.length; j++) {
if(board[i][j] == 0) continue;
answer[board[i][j]+1] ++;
}
}
for (int i = 2; i < N+2; i++) {
System.out.println(answer[i]);
}
}
}