#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  std::vector<long long> v(2 * n);
  for (long long i = 0; i < 2 * n; i++) cin >> v[i];
  sort((v).begin(), (v).end(), greater<long long>());
  if (v[n - 1] == v[n])
    cout << "NO";
  else
    cout << "YES";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
