#P8401. [CCC 2022 J2] Fergusonball Ratings

[CCC 2022 J2] Fergusonball Ratings

Problem Description

You now need to rate a team.

The ii-th person in the team scored aia_i goals and committed bib_i fouls.

So the score of the ii-th person is 5×ai3×bi5 \times a_i - 3 \times b_i.

If the ii-th person's score is greater than 4040, then this person is a golden player.

Correspondingly, if everyone on the team is a golden player, then this team is a golden team.

Input Format

The first line contains an integer nn, which indicates the number of people on the team.

In the next 2n2n lines, line 2i12i - 1 gives aia_i, and line 2i2i gives bib_i.

Output Format

Output one line: the number of golden players. If this is a golden team, output an additional +.

3
12
4
10
3
9
1
3+
2
8
0
12
1
1

Hint

For all testdata: 1n201 \le n \le 20, 1ai,bi20001 \le a_i, b_i \le 2000.

Translated by ChatGPT 5