#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(2 * n);
  for (int i = 0; i < 2 * n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a.begin(), a.end());
  printf("%s\n", (a[n - 1] != a[n]) ? "YES" : "NO");
  return 0;
}
