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