logo AlgoBeat OnlineJudge
登录 注册

#217700. [PacNW 2025] Triangle of Triangles

内存限制:2048 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Audrey's favorite triangle has angles , , and degrees. Ruan Mei likes exactly two kinds of triangles: one with angles , , and , and one with angles , , and . The order of the angles does not matter.

Audrey wants to draw a segment from one vertex of her triangle to the opposite side, cutting the triangle into two smaller triangles. Determine whether both resulting triangles can be kinds that Ruan Mei likes.

输入格式

The first line contains an integer (), the number of test cases.

Each test case consists of three lines. Line contains three integers satisfying and . All values are divisible by . The two triangle types Ruan Mei likes are distinct.

输出格式

For each test case, output YES if one cut can produce two triangles Ruan Mei likes. Otherwise, output NO.

样例

样例输入 1

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

样例输出 1

YES
NO
YES