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