#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  long long a[2 * n + 5];
  for (long long i = 1; i <= 2 * n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + 2 * n + 1);
  long long x = n;
  if (a[x + 1] <= a[x]) {
    cout << "NO"
         << "\n";
    return 0;
  }
  cout << "YES"
       << "\n";
}
