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