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