#include <bits/stdc++.h>
using namespace std;
string Arr(int na, int nb, int k, int m, int* a, int* b) {
  if (b[nb - m] > a[k - 1])
    return "YES";
  else
    return "NO";
}
int main() {
  int na, nb, k, m;
  int *a, *b;
  cin >> na;
  cin >> nb;
  cin >> k;
  cin >> m;
  a = new int[na];
  b = new int[nb];
  for (int i = 0; i < na; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < nb; i++) {
    cin >> b[i];
  }
  cout << Arr(na, nb, k, m, a, b);
  delete a;
  delete b;
  return 0;
}
