#include <bits/stdc++.h>
using namespace std;
int compare_int(const void *int1, const void *int2) {
  return (*(int *)int1 - *(int *)int2);
}
int main() {
  int n1, n2;
  int k, m;
  cin >> n1 >> n2;
  cin >> k >> m;
  int arr1[n1], arr2[n2];
  for (int i = 0; i < n1; i++) {
    cin >> arr1[i];
  }
  for (int i = 0; i < n2; i++) {
    cin >> arr2[i];
  }
  qsort(arr1, sizeof arr1 / sizeof arr1[0], sizeof arr1[0], compare_int);
  qsort(arr2, sizeof arr2 / sizeof arr2[0], sizeof arr2[0], compare_int);
  if (arr1[k - 1] < arr2[n2 - m])
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
