#include <bits/stdc++.h>
int na, nb, k, m;
int a[100000 + 5], b[100000 + 5];
int main() {
  scanf("%d %d %d %d", &na, &nb, &k, &m);
  for (int i = 0; i < na; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < nb; i++) {
    scanf("%d", &b[i]);
  }
  if (a[k - 1] < b[nb - m])
    printf("YES\n");
  else
    printf("NO\n");
}
