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