TopCoder

User's AC Ratio

NaN% (0/0)

Submission's AC Ratio

NaN% (0/0)

Tags

Description

Triathlon is an athletic contest consisting of three consecutive sections that should be completed as fast as possible as a whole. The first section is swimming, the second section is riding bicycle and the third one is running.


The speed of each contestant in all three sections is known. The judge can choose the length of each section arbitrarily provided that no section has zero length. As a result sometimes she could choose their lengths in such a way that some particular contestant would win the competition.

Input Format

There are multiple test case in the input file.


The first line of each test case contains an integer number N (1 ≤ N ≤ 100), denoting the number of contestants. Then N lines follow, each line contains three integers Vi, Ui and Wi (1 ≤ Vi, Ui, Wi ≤ 10000),
separated by spaces, denoting the speed of ith contestant in each section.


N = 0 terminates the input.

Output Format

For every contestant write to the output file one line, that contains
word "Yes" if the judge could choose the lengths of the sections in such a way
that this particular contestant would win (i.e. she is the only one who
would come first), or word "No" if this is impossible.

Sample Input 1

9
10 2 6
10 7 3
5 6 7
3 2 7
6 2 6
3 5 7
8 4 6
10 4 2
1 8 7
1
5 1 4
0

Sample Output 1

Yes
Yes
Yes
No
No
No
Yes
No
Yes
Yes

Hints

被雷到可能會影響您的身心健康,ACM2009培訓班關心您。(按我繼續)

Problem Source

Migrated from old NTUJ.

NEERC 2000, Ural 1062

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 10000 65536 200