| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 2048 MB | 41 | 40 | 15 | 93.750% |
Audrey has a favorite triangle. Specifically, the angles of the triangle are $a_1$ degrees, $b_1$ degrees, and $c_1$ degrees.
Ruan Mei only likes two types of triangles. Specifically, she only likes a triangle if the degrees of the three angles are either $a_2$ degrees, $b_2$ degrees, and $c_2$ degrees; or $a_3$ degrees, $b_3$ degrees, and $c_3$ degrees. The order of the angles does not matter.
Audrey and Ruan Mei only like multiples of 5ドル,ドル so it is guaranteed that the degree measures of all of the angles in their favorite triangles are divisible by 5ドル$.
Audrey wants to draw a line segment starting at one vertex of her favorite triangle and ending at the opposite side of that vertex such that, if she cuts the triangle along that line segment, she divides the triangle into two smaller triangles, both of which Ruan Mei likes. Is this possible?
The first line contains a single integer, $T$ (1ドル \le T \le 10^4$). $T$ test cases follow.
The description for each test case spans three lines.
The first line contains three integers, $a_1,ドル $b_1,ドル and $c_1$ (5ドル \le a_1 \le b_1 \le c_1 \le 170, a_1 + b_1 + c_1 = 180$).
The second line contains three integers, $a_2,ドル $b_2,ドル and $c_2$ (5ドル \le a_2 \le b_2 \le c_2 \le 170, a_2 + b_2 + c_2 = 180$).
The third line contains three integers, $a_3,ドル $b_3,ドル and $c_3$ (5ドル \le a_3 \le b_3 \le c_3 \le 170, a_3 + b_3 + c_3 = 180$).
It is guaranteed at least one of $a_2 \neq a_3,ドル $b_2 \neq b_3,ドル or $c_2 \neq c_3$. It is furthermore guaranteed that all of these values are divisible by 5ドル$.
Output $T$ lines. On the $i$th line, output the answer for the $i$th test case.
Output YES if it is possible for Audrey to cut her favorite triangle exactly once to form two triangles, both of which Ruan Mei likes. Otherwise, output NO.
3 30 60 90 15 30 135 45 45 90 30 60 90 15 30 135 40 50 90 45 45 90 45 45 90 5 10 165
YES NO YES
ICPC > Regionals > North America > Pacific Northwest Regional > 2025 ICPC Pacific Northwest Regional > Division 1 M번
ICPC > Regionals > North America > Pacific Northwest Regional > 2025 ICPC Pacific Northwest Regional > Division 2 M번