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