#include <bits/stdc++.h>
using namespace std;
int main()
{
    int t,k;
    cin>>t;
int n;
cin >> n;
cin>>k;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
int s1=0;
sort(a.begin(), a.end());
for(int i=0;i<n;i++){
    if (a[i]>a[i-1])
    s1--;
    else
    s1++;
}
sort(a.end(), a.begin());
int s2=0;
sort(a.begin(), a.end());
for(int i=0;i<n;i++){
    if (a[i]>a[i-1])
    s2--;
    else
    s2++;
}
if (k<<s2&&k>>s1)
    cout<<"NE"<<endl;
    return 0;
}