#include <bits/stdc++.h>
int main() {
  int ara1[100010], ara2[100010], x, y, k, m, i;
  scanf("%d %d", &x, &y);
  scanf("%d %d", &k, &m);
  for (i = 0; i < x; i++) {
    scanf("%d", &ara1[i]);
  }
  for (i = 0; i < y; i++) {
    scanf("%d", &ara2[i]);
  }
  for (i = y - 1; i >= y - m; i--) {
    if (ara1[k - 1] >= ara2[i]) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
