#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const double PI = acos(-1);
const int inf = 0x3f3f3f3f;
const double esp = 1e-6;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
int dir[4][2] = {0, 1, 1, 0, 0, -1, -1, 0};
int main() {
  int a[1005], b[1005], i, j, k, n;
  while (cin >> n) {
    for (i = 0; i < 2 * n; i++) {
      cin >> a[i];
    }
    sort(a, a + 2 * n);
    if (a[n - 1] != a[n])
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
