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