#include <bits/stdc++.h>
using namespace std;
int n, m, k, t;
const int maxN = 100010;
int a[maxN], b[maxN];
vector<int> v1, v2;
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    v1.clear();
    v2.clear();
    memset(a, 0, sizeof a);
    memset(b, 0, sizeof b);
    scanf("%d%d", &k, &t);
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    for (int i = 0; i < m; i++) scanf("%d", &b[i]);
    sort(a, a + n);
    sort(b, b + m);
    bool flag = false;
    int w = 0;
    for (int i = 0; i < k; i++) v1.push_back(a[i]);
    for (int j = m - 1; j >= m - t; j--) v2.push_back(b[j]);
    if (v1[k - 1] >= v2[t - 1]) flag = true;
    if (flag)
      printf("NO\n");
    else
      printf("YES\n");
  }
}
