#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5, M = 1e12;
map<int, int> mp;
vector<vector<int> > g;
queue<int> qu;
vector<long long> v;
long long x, y, n, m, u, w, z = 0, mx = 1e6, mn, sum = 0;
int main() {
  cin >> x;
  x = x * 2;
  v.resize(x);
  for (int i = 0; i < x; i++) cin >> v[i];
  sort(v.begin(), v.end());
  n = v[x / 2 - 1];
  m = v[x / 2];
  bool f = 0;
  if (m > n)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
