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