PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SCKTCUOIKI0010. Thống kê kết quả học tập (Student Score Statistics)

Bài tập này chưa được xếp vào lộ trình.

Thống kê kết quả học tập (Student Score Statistics)

Student Score Statistics

**Version: Phuoc Hung OJ Extended

Problem Statement

A class has nn students, each with an integer test score from 00 to 1010. Scores are divided into four disjoint categories: Excellent (Giỏi) for 88–1010, Good (Khá) for exactly 77, Average (Trung bình) for 55 or 66, and Not Passed (Chưa đạt) for 00–44. Count the students in each category; each student contributes to exactly one category.

Input

The first line contains integer nn, the number of students.

Each of the next nn lines contains integer diemidiem_i, the score of student ii (1≤i≤n1\le i\le n).

Output

Print exactly four lines, each containing one integer. Line 1: number of Excellent students. Line 2: number of Good students. Line 3: number of Average students. Line 4: number of Not Passed students. Do not print category labels.

Subtasks

  • Subtask 1 (20 points): 1≤n≤51\le n\le5; 0≤diemi≤40\le diem_i\le4 for every 1≤i≤n1\le i\le n.
  • Subtask 2 (30 points): 1≤n≤101\le n\le10; 0≤diemi≤70\le diem_i\le7 for every 1≤i≤n1\le i\le n.
  • Subtask 3 (50 points): 1≤n≤201\le n\le20; 0≤diemi≤100\le diem_i\le10 for every 1≤i≤n1\le i\le n.

Examples

Input

6
9
7
5
3
8
10

Output

3
1
1
1

Explanation

There are 66 scores: 9,7,5,3,8,109,7,5,3,8,10. Excellent contains 9,8,109,8,10 (3 students); Good contains 77 (1); Average contains 55 (1); Not Passed contains 33 (1). Hence the four output lines are 3, 1, 1, 1.