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