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