#include <bits/stdc++.h>
using namespace std;
long long int a[100000], b[100000];
int main() {
  long long int na, nb, k, m;
  cin >> na >> nb >> k >> m;
  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" << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
