{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"### Read problem statements in [Mandarin Chinese](https://www.codechef.com/download/translated/START5/mandarin/CYCLICQD.pdf), [Russian](https://www.codechef.com/download/translated/START5/russian/CYCLICQD.pdf), and [Vietnamese](https://www.codechef.com/download/translated/START5/vietnamese/CYCLICQD.pdf) as well.\n\nYou are given the sizes of angles of a simple quadrilateral (in degrees) $A$, $B$, $C$ and $D$, in some order along its perimeter. Determine whether the quadrilateral is cyclic.\n\nNote: A quadrilateral is cyclic if and only if the sum of opposite angles is $180^{\\circ}$.\n\n### Input\n- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.\n- The first and only line of each test case contains four space-separated integers $A$, $B$, $C$ and $D$.\n\n### Output\nPrint a single line containing the string `\"YES\"` if the given quadrilateral is cyclic or `\"NO\"` if it is not (without quotes).\n\nYou may print each character of the string in uppercase or lowercase (for example, the strings \"yEs\", \"yes\", \"Yes\" and \"YES\" will all be treated as identical).\n\n### Constraints\n- $1 \\leq T \\leq 10^4$\n- $1 \\leq A, B, C, D \\leq 357$\n- $A + B + C + D \u003d 360$"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\n10 20 30 300\n10 20 170 160\n179 1 179 1\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNO\nYES\nNO\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n**Example case 1:** The sum of two opposite angles $A + C \u003d 10^{\\circ} + 30^{\\circ} \\neq 180^{\\circ}$.\n\n**Example case 2:** The sum of two opposite angles $A + C \u003d 10^{\\circ} + 170^{\\circ} \u003d 180^{\\circ}$ and $B + D \u003d 20^{\\circ} + 160^{\\circ} \u003d 180^{\\circ}$.\n\n**Example case 3:** The sum of two opposite angles $B + D \u003d 1^{\\circ} + 1^{\\circ} \\neq 180^{\\circ}$."}}]}