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