#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  vector<int> v;
  cin >> N;
  for (int i = 0; i < 2 * N; i++) {
    int temp;
    cin >> temp;
    v.push_back(temp);
  }
  sort(v.begin(), v.end());
  bool possible = true;
  for (int i = 0; i < N; i++) {
    if (v[2 * N - 1 - i] <= v[i]) {
      possible = false;
      break;
    }
  }
  if (possible)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
