#include <bits/stdc++.h>
using namespace std;
const int maxn = 100;
int n;
int Array[maxn * 2];
int main() {
  cin >> n;
  for (int i = 0; i < (2 * n); i++) cin >> Array[i];
  sort(Array, Array + 2 * n);
  if (Array[n] > Array[n - 1])
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
