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