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