#include <bits/stdc++.h>
long long int MAX(long long int a, long long int b) {
  if (a > b)
    return a;
  else
    return b;
}
using namespace std;
long long int MIN(long long int a, long long int b) {
  if (a < b)
    return a;
  else
    return b;
}
int main() {
  int nA, nB, k, m;
  scanf("%d%d%d%d", &nA, &nB, &k, &m);
  vector<long long int> seqA(nA), seqB(nB);
  for (int i = 0; i < nA; i++) scanf("%lld", &seqA[i]);
  for (int ii = 0; ii < nB; ii++) scanf("%lld", &seqB[ii]);
  (seqA[k - 1] < seqB[nB - m]) ? printf("YES\n") : printf("NO\n");
  return 0;
}
