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