#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int* mas1 = new int[2 * n];
  memset(mas1, 0, 8 * n);
  for (int i = 0; i < 2 * n; i++) {
    cin >> mas1[i];
  }
  for (int i = 0; i < 2 * n; i++) {
    for (int j = 2 * n - 1; j > i; j--) {
      if (mas1[j] > mas1[j - 1]) {
        swap(mas1[j], mas1[j - 1]);
      }
    }
  }
  if (mas1[2 * n / 2 - 1] > mas1[2 * n / 2]) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
