#include <bits/stdc++.h>
int main() {
  int m, n, i, j, p, q;
  scanf("%d %d", &m, &n);
  scanf("%d %d", &p, &q);
  int ar[m], br[n];
  for (i = 0; i < m; i++) {
    scanf("%d", &ar[i]);
  }
  for (i = 0; i < n; i++) {
    scanf("%d", &br[i]);
  }
  if (ar[p - 1] < br[n - q])
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
