#include <bits/stdc++.h>
using namespace std;
int main() {
  int na, nb, ka, kb;
  long long arra[100000], arrb[100000];
  cin >> na >> nb >> ka >> kb;
  for (int i = 0; i < na; i++) {
    cin >> arra[i];
  }
  for (int i = 0; i < nb; i++) {
    cin >> arrb[i];
  }
  sort(arra, arra + na);
  sort(arrb, arrb + nb);
  if (arra[ka - 1] >= arrb[nb - kb]) {
    cout << "NO";
  } else
    cout << "YES";
}
