#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int binary_exponentation(int a, int b) {
  int ret = 1;
  while (b) {
    if (b & 1) ret = (ret * a) % mod;
    b >>= 1;
    a = (a * a) % mod;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  {
    int n;
    cin >> n;
    vector<int> a(2 * n), x(n), y(n);
    for (int i = 0; i < 2 * n; i++) {
      cin >> a[i];
    }
    sort(a.begin(), a.end(), greater<int>());
    bool flag = true;
    if (a[n - 1] <= a[n]) {
      flag = false;
    }
    if (flag) {
      cout << "YES" << '\n';
    } else {
      cout << "NO" << '\n';
    }
  }
  return 0;
}
