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