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