#include <bits/stdc++.h>
using namespace std;
int n, t[204], i, m;
bool b = true;
int main() {
  cin >> n;
  for (i = 0; i < 2 * n; i++) {
    cin >> t[i];
  }
  sort(t, t + (n * 2));
  m = n * 2 - 1;
  for (i = 0; i < n; i++) {
    if (t[i] >= t[m]) {
      b = false;
      break;
    }
    m--;
  }
  if (b == true)
    cout << "YES";
  else
    cout << "NO";
}
