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