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