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