#include <bits/stdc++.h>
int cmp(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
  int x, y, n, m, i, j, a[100001], b[100001];
  scanf("%d%d", &n, &m);
  scanf("%d%d", &x, &y);
  for (i = 0; i < n; ++i) scanf("%d", &a[i]);
  for (i = 0; i < m; ++i) scanf("%d", &b[i]);
  qsort(a, n, sizeof(a[0]), cmp);
  qsort(b, m, sizeof(b[0]), cmp);
  if (b[m - y] > a[x - 1])
    printf("YES\n");
  else
    printf("NO\n");
}
