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