#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ar[2 * n];
  for (auto i = 0; i < 2 * n; i++) {
    cin >> ar[i];
  }
  int pair = 0;
  sort(ar, ar + 2 * n);
  bool flag = true;
  if (ar[n - 1] == ar[n]) {
    flag = false;
  }
  cout << (flag ? "YES" : "NO");
  return 0;
}
