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