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