{"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\u003eThese are tough times for Berland nowadays. State property is being sold piece by piece, and even state oil company \"BerOil\" hasn\u0027t escaped the common lot.\u003c/p\u003e\u003cp\u003eA well-known entrepreneur Tapochkin decided to buy a piece of \"BerOil\"\u0027s land. Tapochkin is very smart, so he wants to buy a piece of land that will contain all of the company\u0027s oil wells within its area or on its border. He has already bought a fence building machine that will move along the border of Tapochkin\u0027s new land and build a high fence! There is only one problem — the machine is defective.\u003c/p\u003e\u003cp\u003eNormally, the machine can move in any of the four directions: \"north\", \"east\", \"south\" and \"west\". Now, when it\u0027s broken, the situation is a bit different. Before the engine is turned on, the driver divides these four directions into two groups — two perpendicular directions in each group (e.g. \"north\" and \"east\" in one group, \"south\" and \"west\" in the other group). Then for some time the machine moves using only directions from the first group, after that — only directions from the second group. It\u0027s the driver who determines the moment of switching from one group to the other one.\u003c/p\u003e\u003cp\u003eThe company\u0027s territory is split into equal squares by a system of roads. Half of the roads go in \"north-south\" direction, the other half — in \"east-west\" direction. The company has a vast territory that can be regarded as infinite. The roads form a square grid, each square of the grid has a side length equal to 1 km. Oil wells are located on the crossroads and their size is negligible, so they can be considered points.\u003c/p\u003e\u003cp\u003eCartesian coordinate system can be applied to the company\u0027s territory, so that \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eOx\u003c/i\u003e\u003c/span\u003e axis is directed west-to-east, and \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eOy\u003c/i\u003e\u003c/span\u003e axis — south-to-north. Unit of length — 1 km. Initial position of the machine and coordinates of the oil wells are known. Find the area of the smallest possible piece of land that the machine can fence around, leaving all the oil wells inside the fenced area or on its border. Also, find the sequence of machine\u0027s movements. The border of Tapochkin\u0027s piece of land should be a closed non-degenerate polyline that doesn\u0027t cross or touch itself.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of input contains three integers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ex\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e0\u003c/sub\u003e\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ey\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e0\u003c/sub\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 400, - 400 ≤ \u003ci\u003ex\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e0\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e0\u003c/sub\u003e ≤ 400\u003c/span\u003e), where \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e — amount of oil wells, \u003cspan class\u003d\"tex-span\"\u003e(\u003ci\u003ex\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e0\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e0\u003c/sub\u003e)\u003c/span\u003e — initial position of the fence building machine. The following \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e lines contain coordinates of the wells \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ex\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e - 400 ≤ \u003ci\u003ex\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e, \u003ci\u003ey\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ 400\u003c/span\u003e). No two wells have identical coordinates.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint the only number \u003cspan class\u003d\"tex-font-style-tt\"\u003e-1\u003c/span\u003e to the output, if there is no solution. Otherwise print the area of Tapochkin\u0027s land in square kilometers to the first line, and the path of the fence building machine — to the second. The path of the machine is a sequence of characters \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eW\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eN\u003c/span\u003e\", \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eE\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eS\u003c/span\u003e\", standing for movements one kilometer \"west\", \"north\", \"east\" or \"south\" correspondingly. You are allowed to print the path in any direction of driving — clockwise or counterclockwise, as it doesn\u0027t really change the closed polyline which the path represents. It there is more than one answer, you may print any of them.\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 4 2\n5 6\n7 2\n9 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e13\nNENNNEEEESSWWSSWWW\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\u003e2 1 -2\n-1 2\n1 -2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\nNWNNNWSSSSEE\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\u003e1 1 2\n1 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\nESWN\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}