{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"### Read problems statements in [Mandarin Chinese](https://www.codechef.com/download/translated/COOK128/mandarin/PSGRADE.pdf), [Russian](https://www.codechef.com/download/translated/COOK128/russian/PSGRADE.pdf), and [Bengali](https://www.codechef.com/download/translated/COOK128/bengali/PSGRADE.pdf) as well.\r\n\r\nRecently, Chef\u0027s College Examination has concluded. He was enrolled in $3$ courses and he scored $A, B, C$ in them, respectively. To pass the semester, he must score at least $A_{min}, B_{min}, C_{min}$ marks in the respective subjects along with a cumulative score of at least $T_{min}$, i.e, $A + B + C \\ge T_{min}$.\r\n\r\nGiven seven integers $A_{min}, B_{min}, C_{min}, T_{min}, A, B, C$, tell whether Chef passes the semester or not.\r\n\r\n### Input:\r\n\r\n- The first line will contain $T$, number of testcases. Then the testcases follow. \r\n- Each testcase contains of a single line of input, seven integers $A_{min}, B_{min}, C_{min}, T_{min}, A, B, C$ each separated by aspace.\r\n\r\n### Output:\r\nOutput in a single line, the answer, which should be \"YES\" if Chef passes the semester and \"NO\" if not.\r\n\r\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).\r\n\r\n### Constraints \r\n- $1 \\leq T \\leq 100$\r\n- $1 \\leq A_{min}, B_{min}, C_{min}, A, B, C \\leq 100$\r\n- $A_{min} + B_{min} + C_{min} \\leq T_{min} \\leq 300$"}},{"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\u003e5\r\n1 1 1 300 2 2 2\r\n3 2 2 6 2 2 2\r\n2 3 2 6 2 2 2\r\n2 2 3 6 2 2 2\r\n100 100 100 300 100 100 100\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNO\r\nNO\r\nNO\r\nNO\r\nYES\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n**TestCase 1:** Chef is passing in all the subjects individually but his total score ($2 + 2 + 2 \u003d 6$) is much below the required threshold of $300$ marks. So Chef doesn\u0027t pass the semester.\r\n\r\n**TestCase 2:** Chef\u0027s score in the first subject is less than the threshold, so he doesn\u0027t pass the semester.\r\n\r\n**TestCase 3:** Chef\u0027s score in the second subject is less than the threshold, so he doesn\u0027t pass the semester.\r\n\r\n**TestCase 4:** Chef\u0027s score in the third subject is less than the threshold, so he doesn\u0027t pass the semester.\r\n\r\n**TestCase 5:** Chef is passing in all the subjects individually and also his total score is equal to the required threshold of $300$ marks. So Chef passes the semester."}}]}