#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 1e6 + 4;
int main() {
  int n;
  scanf("%d", &n);
  n *= 2;
  int a[n];
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  int ind = n / 2;
  if (a[ind] > a[ind - 1])
    printf("YES");
  else
    printf("NO");
}
