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