#include <bits/stdc++.h>
int compare(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int a[205];
int main() {
  int i, n;
  scanf("%d", &n);
  for (i = 0; i < 2 * n; ++i) {
    scanf("%d", a + i);
  }
  qsort(a, 2 * n, sizeof(int), compare);
  printf("%s\n", a[n - 1] < a[n] ? "YES" : "NO");
  return 0;
}
