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