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