#include <bits/stdc++.h>
using namespace std;
long long ans = 0;
long long n, h, l, r, sum;
long long f(long long i, long long a[]) {
  if (i < 0) return 0;
  long long k = (f(i - 1, a) + a[i]) % h;
  if (k <= r && k >= l) ans++;
  return (k);
  k = (f(i - 1, a) + a[i] - 1) % h;
  if (k <= r && k >= l) ans++;
  return k;
}
int main() {
  ios::sync_with_stdio(false);
  cout.tie(0);
  cout.tie(0);
  ;
  long long tt = 1;
  while (tt--) {
    long long n;
    cin >> n;
    long long a[2 * n];
    for (long long i = 0; i < 2 * n; i++) cin >> a[i];
    sort(a, a + 2 * n);
    long long i = n, j = n - 1, ans = 0;
    while (j >= 0) {
      if (a[i] == a[j]) {
        ans++;
        break;
      } else
        break;
      i++;
      j--;
    }
    if (ans == 1)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
