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