#include <bits/stdc++.h>
using namespace std;
int main() {
  int n1, n2, k, m, p, q, temp, i;
  scanf("%d%d%d%d", &n1, &n2, &k, &m);
  int a[n1], b[n2];
  for (i = 0; i < n1; i++) scanf("%d", &a[i]);
  for (i = 0; i < n2; i++) scanf("%d", &b[i]);
  temp = a[k - 1];
  for (i = 0; i < n2; i++) {
    if (b[i] > temp) break;
  }
  if (n2 - i >= m)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
