#include <bits/stdc++.h>
using namespace std;
int main() {
  int na, nb, k, m;
  cin >> na >> nb;
  cin >> k >> m;
  int a[na], b[nb];
  bool flg = false;
  for (int i = 0; i < na; i++) cin >> a[i];
  for (int i = 0; i < nb; i++) cin >> b[i];
  for (int i = na - 1; i > max(k - 2, -1); i--) {
    int x = upper_bound(b, b + nb, a[i]) - b;
    if (x <= nb - m) {
      flg = true;
      break;
    }
  }
  printf("%s\n", flg ? "YES" : "NO");
  return 0;
}
