{"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\u003eOn the Literature lesson Sergei noticed an awful injustice, it seems that some students are asked more often than others.\u003c/p\u003e\u003cp\u003eSeating in the class looks like a rectangle, where \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e rows with \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003em\u003c/i\u003e\u003c/span\u003e pupils in each. \u003c/p\u003e\u003cp\u003eThe teacher asks pupils in the following order: at first, she asks all pupils from the first row in the order of their seating, then she continues to ask pupils from the next row. If the teacher asked the last row, then the direction of the poll changes, it means that she asks the previous row. The order of asking the rows looks as follows: the \u003cspan class\u003d\"tex-span\"\u003e1\u003c/span\u003e-st row, the \u003cspan class\u003d\"tex-span\"\u003e2\u003c/span\u003e-nd row, \u003cspan class\u003d\"tex-span\"\u003e...\u003c/span\u003e, the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e - 1\u003c/span\u003e-st row, the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e-th row, the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e - 1\u003c/span\u003e-st row, \u003cspan class\u003d\"tex-span\"\u003e...\u003c/span\u003e, the \u003cspan class\u003d\"tex-span\"\u003e2\u003c/span\u003e-nd row, the \u003cspan class\u003d\"tex-span\"\u003e1\u003c/span\u003e-st row, the \u003cspan class\u003d\"tex-span\"\u003e2\u003c/span\u003e-nd row, \u003cspan class\u003d\"tex-span\"\u003e...\u003c/span\u003e\u003c/p\u003e\u003cp\u003eThe order of asking of pupils on the same row is always the same: the \u003cspan class\u003d\"tex-span\"\u003e1\u003c/span\u003e-st pupil, the \u003cspan class\u003d\"tex-span\"\u003e2\u003c/span\u003e-nd pupil, \u003cspan class\u003d\"tex-span\"\u003e...\u003c/span\u003e, the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003em\u003c/i\u003e\u003c/span\u003e-th pupil.\u003c/p\u003e\u003cp\u003eDuring the lesson the teacher managed to ask exactly \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ek\u003c/i\u003e\u003c/span\u003e questions from pupils in order described above. Sergei seats on the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/span\u003e-th row, on the \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ey\u003c/i\u003e\u003c/span\u003e-th place in the row. Sergei decided to prove to the teacher that pupils are asked irregularly, help him count three values:\u003c/p\u003e\u003col\u003e \u003cli\u003e the maximum number of questions a particular pupil is asked, \u003c/li\u003e\u003cli\u003e the minimum number of questions a particular pupil is asked, \u003c/li\u003e\u003cli\u003e how many times the teacher asked Sergei. \u003c/li\u003e\u003c/ol\u003e\u003cp\u003eIf there is only one row in the class, then the teacher always asks children from this row.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first and the only line contains five integers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003en\u003c/i\u003e\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003em\u003c/i\u003e\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ek\u003c/i\u003e\u003c/span\u003e, \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ex\u003c/i\u003e\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ey\u003c/i\u003e\u003c/span\u003e (\u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003en\u003c/i\u003e, \u003ci\u003em\u003c/i\u003e ≤ 100, 1 ≤ \u003ci\u003ek\u003c/i\u003e ≤ 10\u003csup class\u003d\"upper-index\"\u003e18\u003c/sup\u003e, 1 ≤ \u003ci\u003ex\u003c/i\u003e ≤ \u003ci\u003en\u003c/i\u003e, 1 ≤ \u003ci\u003ey\u003c/i\u003e ≤ \u003ci\u003em\u003c/i\u003e\u003c/span\u003e).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint three integers:\u003c/p\u003e\u003col\u003e \u003cli\u003e the maximum number of questions a particular pupil is asked, \u003c/li\u003e\u003cli\u003e the minimum number of questions a particular pupil is asked, \u003c/li\u003e\u003cli\u003e how many times the teacher asked Sergei. \u003c/li\u003e\u003c/ol\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\u003e1 3 8 1 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3 2 3\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 2 9 4 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2 1 1\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\u003e5 5 25 4 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 1 1\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\u003e100 100 1000000000000000000 100 100\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e101010101010101 50505050505051 50505050505051\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\u003eThe order of asking pupils in the first test: \u003c/p\u003e\u003col\u003e \u003cli\u003e the pupil from the first row who seats at the first table, it means it is Sergei; \u003c/li\u003e\u003cli\u003e the pupil from the first row who seats at the second table; \u003c/li\u003e\u003cli\u003e the pupil from the first row who seats at the third table; \u003c/li\u003e\u003cli\u003e the pupil from the first row who seats at the first table, it means it is Sergei; \u003c/li\u003e\u003cli\u003e the pupil from the first row who seats at the second table; \u003c/li\u003e\u003cli\u003e the pupil from the first row who seats at the third table; \u003c/li\u003e\u003cli\u003e the pupil from the first row who seats at the first table, it means it is Sergei; \u003c/li\u003e\u003cli\u003e the pupil from the first row who seats at the second table; \u003c/li\u003e\u003c/ol\u003e\u003cp\u003eThe order of asking pupils in the second test: \u003c/p\u003e\u003col\u003e \u003cli\u003e the pupil from the first row who seats at the first table; \u003c/li\u003e\u003cli\u003e the pupil from the first row who seats at the second table; \u003c/li\u003e\u003cli\u003e the pupil from the second row who seats at the first table; \u003c/li\u003e\u003cli\u003e the pupil from the second row who seats at the second table; \u003c/li\u003e\u003cli\u003e the pupil from the third row who seats at the first table; \u003c/li\u003e\u003cli\u003e the pupil from the third row who seats at the second table; \u003c/li\u003e\u003cli\u003e the pupil from the fourth row who seats at the first table; \u003c/li\u003e\u003cli\u003e the pupil from the fourth row who seats at the second table, it means it is Sergei; \u003c/li\u003e\u003cli\u003e the pupil from the third row who seats at the first table; \u003c/li\u003e\u003c/ol\u003e"}}]}