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