{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e\"Man, this year has the worst weather ever!\", David said as he sat crouched in the small cave where we had sought shelter from yet another sudden rainstorm. \u003cbr\u003e\"Nuh-uh!\", Diana immediately replied in her traditional know-it-all manner. \u003cbr\u003e\"Is too!\", David countered cunningly. Terrific. Not only were we stuck in this cave, now we would have to listen to those two nagging for at least an hour. It was time to cut this discussion short. \u003cbr\u003e\"Big nuh-uh. In fact, 93 years ago it had already rained five times as much by this time of year.\" \u003cbr\u003e\"Duh\", David capitulated, \"so it\u0027s the worst weather in 93 years then.\" \u003cbr\u003e\"Nuh-uh, this is actually the worst weather in 23 years.\", Diana again broke in. \u003cbr\u003e\"Yeah, well, whatever\", David sighed, \"Who cares anyway?\". \u003cbr\u003eWell, dear contestants, you care, don\u0027t you? \u003cbr\u003eYour task is to, given information about the amount of rain during different years in the history of the universe, and a series of statements in the form \"Year X had the most rain since year Y\", determine whether these are true, might be true, or are false. We say that such a statement is true if: \u003cbr\u003e\u003cbr\u003eThe amount of rain during these two years and all years between them is known. \u003cbr\u003e\u003cbr\u003eIt rained at most as much during year X as it did during year Y. \u003cbr\u003e\u003cbr\u003eFor every year Z satisfying Y \u0026lt; Z \u0026lt; X, the amount of rain during year Z was less than the amount of rain during year X.\u003cbr\u003e\u003cbr\u003eWe say that such a statement might be true if there is an assignment of amounts of rain to years for which there is no information, such that the statement becomes true. We say that the statement is false otherwise.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input will consist of several test cases, each consisting of two parts. \u003cbr\u003eThe first part begins with an integer 1 \u0026lt;\u003d n \u0026lt;\u003d 50000, indicating the number of different years for which there is information. Next follow n lines. The ith of these contains two integers -10\u003csup\u003e9\u003c/sup\u003e \u0026lt;\u003d yi \u0026lt;\u003d 10\u003csup\u003e9\u003c/sup\u003e and 1 \u0026lt;\u003d ri \u0026lt;\u003d 10\u003csup\u003e9\u003c/sup\u003e indicating that there was ri millilitres of rain during year yi (note that the amount of rain during a year can be any nonnegative integer, the limitation on ri is just a limitation on the input). You may assume that yi \u0026lt; yi+1 for 1 \u0026lt;\u003d i \u0026lt; n. \u003cbr\u003eThe second part of a test case starts with an integer 1 \u0026lt;\u003d m \u0026lt;\u003d 10000, indicating the number of queries to process. The following m lines each contain two integers -10\u003csup\u003e9\u003c/sup\u003e \u0026lt;\u003d Y \u0026lt; X \u0026lt;\u003d 10\u003csup\u003e9\u003c/sup\u003e indicating two years. \u003cbr\u003eThere is a blank line between test cases. The input is terminated by a case where n \u003d 0 and m \u003d 0. This case should not be processed. \u003cbr\u003eTechnical note: Due to the size of the input, the use of cin/cout in C++ might be too slow in this problem. Use scanf/printf instead. In Java, make sure that both input and output is buffered."}},{"title":"Output","value":{"format":"HTML","content":"There should be m lines of output for each test case, corresponding to the m queries. Queries should be answered with \"true\" if the statement is true, \"maybe\" if the statement might be true, and \"false\" if the statement is false. \u003cbr\u003eSeparate the output of two different test cases by a blank line."}},{"title":"Sample","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\r\n2002 4920\r\n2003 5901\r\n2004 2832\r\n2005 3890\r\n2\r\n2002 2005\r\n2003 2005\r\n\r\n3\r\n1985 5782\r\n1995 3048\r\n2005 4890\r\n2\r\n1985 2005\r\n2005 2015\r\n\r\n0\r\n0\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003efalse\r\ntrue\r\n\r\nmaybe\r\nmaybe\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}