Elections
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Sema and Yura take part in the elections. But it seems to them too boring, and they interviewed all the voters for whom they had voted.
It is known that there are only n voters and k candidates. You need to determine whether the election will end in one round, that is, whether there is a candidate for whom there was given more than half of the votes.
Input
First line contains two integers n and k (1 ≤ n ≤ 10^5
, 1 ≤ k ≤ 100) - the numbers of voters and the number of candidates.
Second line contains n integers a[1]
, a[2]
, ..., a[n]
(1 ≤ a[i]
≤ k), where a[i]
is the candidate's number, for whom the i-th voter gave his vote.
Output
Print "YES", if the elections will run in one round, and "NO" otherwise.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Submissions 3K
Acceptance rate 36%