{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"Zaima just joined \u003cb\u003eMIST Tech Solutions LTD\u003c/b\u003e as a junior software engineer. Having got a disciple her supervisor, Senior developer Ms. Mayeesha Musarrat, decided to assign Zaima to coffee duty.\n\nMayeesha gave her a list of \u003cb\u003eN\u003c/b\u003e store numbers in sorted order. She would start from store 1 and end her errand at store \u003cb\u003eN\u003c/b\u003e, taking exactly \u003cb\u003eone hour\u003c/b\u003e at each store. On her way out, \u003cb\u003eQ\u003c/b\u003e senior developer(s) saw her. They wanted to know if the list contained their favorite store or not. If their favorite store was on the list, Zaima told them the hour at which she would be at that store. If not, she would tell them the hour at which she would be at the store with the smallest number that is just greater than their favorite store number.\n\nShe kind of got tired of finding the stores from the list everyday. So, she decided to write a code that would tell her the required hour instantly. Can you help her?\n\n\u003cb\u003eN.B.\u003c/b\u003e Zaima starts her errand at hour 1. Meaning, she will be at the first store at hour 1; in the second store at hour 2 and so on."}},{"title":"Input","value":{"format":"MD","content":"The first line of the input contains the number of stores \u003cb\u003eN\u003c/b\u003e. The next line contains \u003cb\u003eN\u003c/b\u003e integers in sorted order. The next line contains \u003cb\u003eQ\u003c/b\u003e, the number of senior developers. Then \u003cb\u003eQ\u003c/b\u003e lines follow each containing a single integer \u003cb\u003eY\u003c/b\u003e, their favorite store number.\n\n\u003cb\u003eNote:\u003c/b\u003e Mayeesha never pays attention to her list. So, If the same store number is present multiple times , Zaima goes into that store again. But, you only have to print the hour at which she goes into that the first time. Also, the input is such that you always have an answer for each query."}},{"title":"Constrains","value":{"format":"MD","content":"\u003cul\u003e\n\u003cli\u003e\u003cb\u003e1≤N≤10\u003csup\u003e5\u003c/sup\u003e\u003c/b\u003e\u003c/li\u003e\n\u003cli\u003e\u003cb\u003e1≤X\u003csub\u003ei\u003c/sub\u003e≤10\u003csup\u003e9\u003c/sup\u003e\u003c/b\u003e,where \u003cb\u003eX\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e is \u003cb\u003ei\u003csup\u003eth\u003c/sup\u003e\u003c/b\u003e element in the array.\u003c/li\u003e\n\u003cli\u003e\u003cb\u003e1≤Q≤10\u003csup\u003e5\u003c/sup\u003e\u003c/b\u003e\u003c/li\u003e\n\u003cli\u003e\u003cb\u003e1≤Y≤10\u003csup\u003e9\u003c/sup\u003e\u003c/b\u003e\u003c/li\u003e\n\u003c/ul\u003e"}},{"title":"Output","value":{"format":"MD","content":"For each query you have to print \"Yes\" (without the quotes) if the store is present and the hour at which Zaima would be present in that store, separated by a space.\n\nIf the store is not present you have to print \"No\" (without the quotes) followed by the hour at which she would be at the store with the smallest number that is just greater than the store number.\n\nYou have to output each query in a new line."}},{"title":"Sample Input","value":{"format":"MD","content":"8\n1 1 2 2 6 9 9 15\n4\n1\n4\n9\n15"}},{"title":"Sample Output","value":{"format":"MD","content":"Yes 1\nNo 5\nYes 6\nYes 8"}}]}