#include #include using namespace std; int main(){ long long n, k; cin >> n >> k; int d[n], count = 0; for(int i = 0; i < n; i++){ cin >> d[i]; d[i]--; } for(int i = 0; i < n; i++){ int mindex = min_element(d + i, d + n) - d; if(mindex != i){ count++; swap(d[i], d[mindex]); } } k -= count; cout << (k >= 0 && !(k & 1) ? "YES" : "NO") << endl; }