P8401 [CCC 2022 J2] Fergusonball Ratings

Description

You now need to rate a team. The $i$-th person in the team scored $a_i$ goals and committed $b_i$ fouls. So the score of the $i$-th person is $5 \times a_i - 3 \times b_i$. If the $i$-th person's score is greater than $40$, 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 $n$, which indicates the number of people on the team. In the next $2n$ lines, line $2i - 1$ gives $a_i$, and line $2i$ gives $b_i$.

Output Format

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

Explanation/Hint

For all testdata: $1 \le n \le 20$, $1 \le a_i, b_i \le 2000$. Translated by ChatGPT 5