#include <bits/stdc++.h>
using namespace std;
bool cmp(int o, int w) { return o > w; }
int a[100005], b[100005];
int main() {
  int na, nb, k, m;
  scanf("%d%d%d%d", &na, &nb, &k, &m);
  for (int i = 1; i <= na; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= nb; i++) {
    scanf("%d", &b[i]);
  }
  sort(a + 1, a + na + 1);
  sort(b + 1, b + nb + 1, cmp);
  if (a[k] < b[m])
    printf("YES\n");
  else
    printf("NO\n");
}
