#include <bits/stdc++.h>
inline int RT(int l, int r) { return l + r | l != r; }
using namespace std;
const int N = 207;
int n, a[N];
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n * 2); ++i) scanf("%d", a + i);
  sort(a + 1, a + 1 + 2 * n, greater<int>());
  if (a[n] > a[n + 1])
    puts("YES");
  else
    puts("NO");
  return 0;
}
