#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, k, j;
  cin >> n;
  j = (2 * n);
  int a[2 * n];
  for (i = 0; i < j; i++) {
    cin >> a[i];
  }
  sort(a, a + j);
  k = (j / 2) - 1;
  if (a[k] == a[k + 1]) {
    cout << "NO";
  } else {
    cout << "YES";
  }
}
