#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[1005];
  int temp;
  while (scanf("%d", &n) != EOF) {
    for (int i = 0; i < 2 * n; i++) scanf("%d", &a[i]);
    sort(a, a + 2 * n);
    if (a[n - 1] != a[n])
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
