{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\n\t\u0026nbsp;\u003c/p\u003e\n\u003ch3 align\u003d\"center\"\u003e\n\tTime Limit: 1 second\u003c/h3\u003e\n\u003cp\u003e\n\tPeter received money from his parents this week and wants to spend it all buying books. it takes him a week to finish a book.\u003c/p\u003e\n\u003cp\u003e\n\tAs Peter receives money every two weeks, he decided to buy two books, then he can read them until he receives more money. As he wishes to spend all the money, he should choose two books whose prices summed up are equal to the money that he has. Find these books.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e\n\tEach test case starts with \u003cb\u003e2 \u0026le; N \u0026le; 10000\u003c/b\u003e, the number of available books. Next line will have \u003cb\u003eN\u003c/b\u003e integers, representing the price of each book, a book costs less than \u003cb\u003e1000001\u003c/b\u003e. Then there is another line with an integer \u003cb\u003eM\u003c/b\u003e, representing how much money Peter has. There is a blank line after each test case. The input is terminated by end of file (\u003cspan data-scayt_word\u003d\"EOF\" data-scaytid\u003d\"1\"\u003eEOF\u003c/span\u003e).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e\n\tFor each test case you must print the message: \u003cb\u003ePeter should buy books whose prices are i and j.\u003c/b\u003e, where \u003cb\u003ei\u003c/b\u003e and \u003cb\u003ej\u003c/b\u003e are the prices of the books whose sum is equal do \u003cb\u003eM\u003c/b\u003e and \u003cb\u003ei \u0026le; j\u003c/b\u003e. You can consider that is always possible to find a solution, if there are multiple solutions print the solution that minimizes the difference between the prices \u003cb\u003ei\u003c/b\u003e and \u003cb\u003ej\u003c/b\u003e. After each test case you must print a blank line.\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e\n2\n40 40\n80\n\n5\n10 2 6 8 4\n10\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e\nPeter should buy books whose prices are 40 and 40.\n\nPeter should buy books whose prices are 4 and 6.\u003c/pre\u003e"}}]}