#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  vector<int> v;
  for (int k = 0; k < 2 * a; k++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  if (v[a] == v[a - 1])
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
}
