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