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