#include <bits/stdc++.h>
int main() {
  int xoX, xoXy, xoY, xox, Xi[100000], Xe[100000], i;
  while (scanf("%d %d", &xoX, &xoXy) == 2) {
    scanf("%d %d ", &xoY, &xox);
    for (i = 0; i < xoX; i++) scanf("%d", &Xi[i]);
    for (i = 0; i < xoXy; i++) scanf("%d", &Xe[i]);
    if (Xi[xoY - 1] < Xe[xoXy - xox])
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
