{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\r\n\t\u003cspan style\u003d\"color: windowtext; text-align: justify;\"\u003eGiven a string of \u003c/span\u003e\u003cb style\u003d\"color: windowtext; text-align: justify;\"\u003e0\u0026#39;s\u003c/b\u003e\u003cspan style\u003d\"color: windowtext; text-align: justify;\"\u003e and \u003c/span\u003e\u003cb style\u003d\"color: windowtext; text-align: justify;\"\u003e1\u0026#39;s\u003c/b\u003e\u003cspan style\u003d\"color: windowtext; text-align: justify;\"\u003e up to \u003c/span\u003e\u003cb style\u003d\"color: windowtext; text-align: justify;\"\u003e1000000\u003c/b\u003e\u003cspan style\u003d\"color: windowtext; text-align: justify;\"\u003e characters long and indices \u003c/span\u003e\u003cb style\u003d\"color: windowtext; text-align: justify;\"\u003ei\u003c/b\u003e\u003cspan style\u003d\"color: windowtext; text-align: justify;\"\u003e and \u003c/span\u003e\u003cb style\u003d\"color: windowtext; text-align: justify;\"\u003ej\u003c/b\u003e\u003cspan style\u003d\"color: windowtext; text-align: justify;\"\u003e, you are to answer a question whether all characters between position \u003c/span\u003e\u003cspan class\u003d\"GramE\" style\u003d\"color: windowtext; text-align: justify;\"\u003e\u003cb\u003emin(\u003c/b\u003e\u003c/span\u003e\u003cb style\u003d\"color: windowtext; text-align: justify;\"\u003ei,j)\u003c/b\u003e\u003cspan style\u003d\"color: windowtext; text-align: justify;\"\u003e and position \u003c/span\u003e\u003cb style\u003d\"color: windowtext; text-align: justify;\"\u003emax(i,j)\u003c/b\u003e\u003cspan style\u003d\"color: windowtext; text-align: justify;\"\u003e (inclusive) are the same.\u003c/span\u003e\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\r\n\tThere are multiple cases on input. The first line of each case gives a string of\u0026nbsp;\u003cstrong\u003e0\u0026#39;s\u003c/strong\u003e\u0026nbsp;and\u0026nbsp;\u003cstrong\u003e1\u0026#39;s\u003c/strong\u003e. The next line contains a positive integer\u0026nbsp;\u003cstrong\u003en\u003c/strong\u003e\u0026nbsp;giving the number of queries for this case. The next\u0026nbsp;\u003cstrong\u003en\u003c/strong\u003e\u0026nbsp;lines contain queries, one per line. Each query is given by two non-negative integers,\u0026nbsp;\u003cstrong\u003ei\u003c/strong\u003e\u0026nbsp;and\u0026nbsp;\u003cstrong\u003ej\u003c/strong\u003e. For each query, you are to print\u0026nbsp;\u003cstrong\u003eYes\u003c/strong\u003e\u0026nbsp;if all characters in the string between position\u0026nbsp;\u003cstrong\u003emin(i,j)\u003c/strong\u003e\u0026nbsp;and position\u0026nbsp;\u003cstrong\u003emax(i,j)\u003c/strong\u003e\u0026nbsp;are the same, and\u0026nbsp;\u003cstrong\u003eNo\u003c/strong\u003e\u0026nbsp;otherwise.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\r\n\t\u003cspan style\u003d\"color: rgb(0, 0, 0); text-align: justify;\"\u003eEach case on output should start with a heading as in the sample below. The input ends with an empty string that is a line containing only the new line character, this string should not be processed. The input may also with end of file. So keep check for both.\u003c/span\u003e\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\r\n0000011111\r\n3\r\n0 5\r\n4 2\r\n5 9\r\n01010101010101010101010101111111111111111111111111111111111110000000000000000\r\n5\r\n4 4\r\n25 60\r\n1 3\r\n62 76\r\n24 62\r\n1\r\n1\r\n0 0\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\r\nCase 1:\r\nNo\r\nYes\r\nYes\r\nCase 2:\r\nYes\r\nYes\r\nNo\r\nYes\r\nNo\r\nCase 3:\r\nYes\u003c/pre\u003e"}}]}