#include <bits/stdc++.h>
using namespace std;
long long pwr(long long base, long long exp, long long mod = (1000000007LL)) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2) {
      res = (res * base) % mod;
    }
    base = (base * base) % mod;
    exp /= 2;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    gcd(b, a % b);
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
const int N = 1234;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[2 * n];
  for (int i = 0; i < 2 * n; ++i) {
    cin >> a[i];
  }
  sort(a, a + 2 * n);
  if (a[n] > a[n - 1]) {
    puts("YES");
  } else {
    puts("NO");
  }
  return 0;
}
