#include <bits/stdc++.h>
using namespace std;
int compare(const void* x1, const void* x2) { return (*(int*)x1 - *(int*)x2); }
int main() {
  int n;
  cin >> n;
  n = n * 2;
  int m[200];
  for (int i = 0; i < n; i++) {
    cin >> m[i];
  }
  qsort(m, n, sizeof(int), compare);
  bool b = true;
  for (int i = n / 2; i < n; i++) {
    if (m[i] <= m[n / 2 - 1]) b = false;
  }
  if (b) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return (0);
}
