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