#include <bits/stdc++.h>
using namespace std;
int main() {
  int na, nb, k, m;
  scanf("%d%d%d%d", &na, &nb, &k, &m);
  vector<int> a(na), b(nb);
  for (int i = 0; i < na; i++) scanf("%d", &a[i]);
  for (int i = 0; i < nb; i++) scanf("%d", &b[i]);
  puts(a[k - 1] < b[nb - m] ? "YES" : "NO");
  return 0;
}
