#include <bits/stdc++.h>
int main() {
  int i, a, n;
  std::vector<int> v;
  std::cin >> n;
  v.assign(2 * n, 0);
  for (i = 0; i < 2 * n; i++) {
    std::cin >> a;
    v[i] = a;
  }
  std::sort(v.begin(), v.end());
  if (v[n - 1] < v[n])
    std::cout << "YES";
  else
    std::cout << "NO";
  return 0;
}
