#C2483. Hackathon Qualification Scoring

    ID: 45804 Type: Default 1000ms 256MiB

Hackathon Qualification Scoring

Hackathon Qualification Scoring

Your task is to implement a scoring system for an internal hackathon. In this contest, each team can solve multiple challenges. For each solved challenge, the score is computed as \(d^2 - t\), where \(d\) is the difficulty level of the challenge and \(t\) is the time taken to solve it. The total score of a team is the sum of the scores for all its challenges. A team qualifies for the next round if its total score is positive (i.e., > 0).

Read the input from standard input and output the results to standard output.

inputFormat

The first line contains an integer \(T\) representing the number of teams. Each of the following \(T\) lines describes a team. For each team, the first number is an integer \(C\), indicating the number of challenges solved by the team. This is followed by \(2 \times C\) integers where every pair represents the difficulty \(d\) and the time \(t\) for a challenge.

outputFormat

For each team, output a single line containing YES if the team qualifies (total score > 0) or NO otherwise.

## sample
1
1 5 10
YES

</p>