{"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\u003eAt the Namomo Camp, a cute volunteer celebrates her birthday. Wowo buys her a huge cake. (The cake is so big that it has a 3D coordinate system inside.) There are $$$n$$$ cuboid shaped pieces of chocolates \u003cspan class\u003d\"tex-font-style-bf\"\u003ein\u003c/span\u003e the cake. The $$$i$$$-th ($$$1\\le i\\le n$$$) chocolate consists of all points $$$(x,y,z)$$$ such that $$$min\\_x[i]\\le x\\le max\\_x[i], min\\_y[i]\\le y\\le max\\_y[i], min\\_z[i]\\le z\\le max\\_z[i]$$$. $$$min\\_x,max\\_x, min\\_y,max\\_y, min\\_z, max\\_z$$$ are $$$6$$$ arrays of integers. Chocolates may overlap or touch each other.\u003c/p\u003e\u003cp\u003eThe volunteer wants to distribute the cake to the campers of the Namomo Camp. To show off his knife skill, Wowo decides to cut the cake into pieces by exactly $$$3$$$ cuts such that: \u003c/p\u003e\u003col\u003e \u003cli\u003e The first cut is a plane whose equation is $$$x\u003da$$$ for some integer $$$a$$$ decided by Wowo. \u003c/li\u003e\u003cli\u003e The second cut is a plane whose equation is $$$y\u003db$$$ for some integer $$$b$$$ decided by Wowo. \u003c/li\u003e\u003cli\u003e The third cut is a plane whose equation is $$$z\u003dc$$$ for some integer $$$c$$$ decided by Wowo. \u003c/li\u003e\u003cli\u003e Each chocolate is \u003cspan class\u003d\"tex-font-style-bf\"\u003etouched\u003c/span\u003e by at least one cut (i.e. each cuboid has a nonempty intersection with at least one plane). \u003c/li\u003e\u003c/ol\u003e\u003cp\u003eDecide whether Wowo can cut the cake under the rules. If the answer is yes, output any possible solution.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains a single integer $$$n$$$ ($$$1\\le n\\le 100000$$$).\u003c/p\u003e\u003cp\u003eThe $$$i$$$-th line of the next $$$n$$$ lines contains $$$6$$$ integers $$$min\\_x[i],max\\_x[i], min\\_y[i],max\\_y[i], min\\_z[i], max\\_z[i]$$$ ($$$-10^9\\le min\\_x[i],max\\_x[i], min\\_y[i],max\\_y[i], min\\_z[i], max\\_z[i]\\le 10^9$$$, $$$min\\_x[i]\u0026lt;max\\_x[i]$$$, $$$min\\_y[i]\u0026lt;max\\_y[i]$$$, $$$min\\_z[i]\u0026lt; max\\_z[i]$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eIf Wowo can cut the cake under the rules, the first line of the output should contain \"YES\" and the second line should contain $$$3$$$ integers $$$a$$$, $$$b$$$ and $$$c$$$ ($$$-10^9\\le a, b, c\\le 10^9$$$). If Wowo cannot cut the cake under the rules, output only one line containing \"NO\".\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\n0 1 0 1 0 1\n10 11 10 11 10 11\n999999999 1000000000 999999999 1000000000 999999999 1000000000\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\n0 10 999999999\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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\u003e4\n0 1 0 1 0 1\n999999999 1000000000 0 1 0 1\n0 1 999999999 1000000000 0 1\n0 1 0 1 999999999 1000000000\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\n0 0 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}