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