{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv\u003e\u003cp\u003eThe cows are having their first election after overthrowing the tyrannical Farmer John, and Bessie is one of \u003ci\u003eN\u003c/i\u003e cows (1 ≤ \u003ci\u003eN\u003c/i\u003e ≤ 50,000) running for President. Before the election actually happens, however, Bessie wants to determine who has the best chance of winning.\u003c/p\u003e\u003cp\u003eThe election consists of two rounds. In the first round, the \u003ci\u003eK\u003c/i\u003e cows (1 ≤ \u003ci\u003eK\u003c/i\u003e ≤ \u003ci\u003eN\u003c/i\u003e) cows with the most votes advance to the second round. In the second round, the cow with the most votes becomes President.\u003c/p\u003e\u003cp\u003eGiven that cow \u003ci\u003ei\u003c/i\u003e expects to get \u003ci\u003eA\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e votes (1 ≤ \u003ci\u003eA\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e ≤ 1,000,000,000) in the first round and \u003ci\u003eB\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e votes (1 ≤ \u003ci\u003eB\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e ≤ 1,000,000,000) in the second round (if he or she makes it), determine which cow is expected to win the election. Happily for you, no vote count appears twice in the \u003ci\u003eA\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e list; likewise, no vote count appears twice in the \u003ci\u003eB\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e list.\u003c/p\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e* Line 1: Two space-separated integers: \u003ci\u003eN\u003c/i\u003e and \u003ci\u003eK\u003c/i\u003e \u003cbr\u003e* Lines 2..\u003ci\u003eN\u003c/i\u003e+1: Line i+1 contains two space-separated integers: \u003ci\u003eA\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e and \u003ci\u003eB\u003csub\u003ei\u003c/sub\u003e\u003c/i\u003e \u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e* Line 1: The index of the cow that is expected to win the election.\u003c/p\u003e"}},{"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\u003e5 3\r\n3 10\r\n9 2\r\n5 6\r\n8 4\r\n6 5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}