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