{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYou are given four integer values $$$a$$$, $$$b$$$, $$$c$$$ and $$$m$$$.\u003c/p\u003e\u003cp\u003eCheck if there exists a string that contains: \u003c/p\u003e\u003cul\u003e \u003cli\u003e $$$a$$$ letters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003eA\u003c/span\u003e\u0027; \u003c/li\u003e\u003cli\u003e $$$b$$$ letters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003eB\u003c/span\u003e\u0027; \u003c/li\u003e\u003cli\u003e $$$c$$$ letters \u0027\u003cspan class\u003d\"tex-font-style-tt\"\u003eC\u003c/span\u003e\u0027; \u003c/li\u003e\u003cli\u003e no other letters; \u003c/li\u003e\u003cli\u003e exactly $$$m$$$ pairs of adjacent equal letters (exactly $$$m$$$ such positions $$$i$$$ that the $$$i$$$-th letter is equal to the $$$(i+1)$$$-th one). \u003c/li\u003e\u003c/ul\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains a single integer $$$t$$$ ($$$1 \\le t \\le 10^4$$$)\u0026nbsp;— the number of testcases.\u003c/p\u003e\u003cp\u003eEach of the next $$$t$$$ lines contains the description of the testcase\u0026nbsp;— four integers $$$a$$$, $$$b$$$, $$$c$$$ and $$$m$$$ ($$$1 \\le a, b, c \\le 10^8$$$; $$$0 \\le m \\le 10^8$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each testcase print \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e\" if there exists a string that satisfies all the requirements. Print \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eNO\u003c/span\u003e\" if there are no such strings.\u003c/p\u003e\u003cp\u003eYou may print every letter in any case you want (so, for example, the strings \u003cspan class\u003d\"tex-font-style-tt\"\u003eyEs\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003eyes\u003c/span\u003e, \u003cspan class\u003d\"tex-font-style-tt\"\u003eYes\u003c/span\u003e and \u003cspan class\u003d\"tex-font-style-tt\"\u003eYES\u003c/span\u003e will all be recognized as positive answer).\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","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\n2 2 1 0\n1 1 1 1\n1 2 3 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\nNO\nYES\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first testcase strings \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eABCAB\u003c/span\u003e\" or \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eBCABA\u003c/span\u003e\" satisfy the requirements. There exist other possible strings.\u003c/p\u003e\u003cp\u003eIn the second testcase there\u0027s no way to put adjacent equal letters if there\u0027s no letter that appears at least twice.\u003c/p\u003e\u003cp\u003eIn the third testcase string \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eCABBCC\u003c/span\u003e\" satisfies the requirements. There exist other possible strings.\u003c/p\u003e"}}]}