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