#include <bits/stdc++.h>
using namespace std;
int a[10000];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= 2 * n; i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + 2 * n);
  if (a[n] != a[n + 1])
    puts("YES");
  else
    puts("NO");
}
