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