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