#include <bits/stdc++.h>
using namespace std;
const int MAXN = 205;
int c[MAXN];
int v[1005];
int main() {
  int no;
  scanf("%d", &no);
  no <<= 1;
  for (int i = 0; i < no; ++i) {
    scanf("%d", &c[i]);
  }
  sort(c, c + no);
  int stp = no >> 1;
  for (int i = 0; i < stp; ++i) {
    v[c[i]] = 1;
  }
  int ok = 1;
  for (int i = stp; i < no; ++i) {
    if (v[c[i]]) {
      ok = 0;
      break;
    }
  }
  puts(ok ? "YES" : "NO");
  return 0;
}
