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