#include <bits/stdc++.h>
using namespace std;
void speed() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void solve() {
  int n;
  cin >> n;
  int a[2 * n];
  for (int i = 0; i < int(2 * n); ++i) {
    cin >> a[i];
  }
  sort(a, a + 2 * n);
  if (a[n - 1] != a[n]) {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
}
int main() {
  speed();
  int tc = 1;
  while (tc--) {
    solve();
  }
}
