#include <bits/stdc++.h>
int main(void) {
  long long int n1, n2, ar1[100005], ar2[100005], k, m, i;
  scanf("%I64d%I64d", &n1, &n2);
  scanf("%I64d%I64d", &k, &m);
  for (i = 0; i < n1; i++) {
    scanf("%I64d", &ar1[i]);
  }
  for (i = 0; i < n2; i++) {
    scanf("%I64d", &ar2[i]);
  }
  if (ar1[k - 1] < ar2[n2 - m])
    printf("YES");
  else
    printf("NO");
  return 0;
}
