#include <bits/stdc++.h>
int main() {
  int n1, n2, n3, n4, n5;
  std::cin >> n1 >> n2 >> n3 >> n4;
  std::vector<int> v1(n1), v2(n2);
  for (int i = 0; i < n1; i++) std::cin >> v1[i];
  for (int i = 0; i < n2; i++) std::cin >> v2[i];
  if (v1[n3 - 1] < v2[v2.size() - n4])
    std::cout << "YES";
  else
    std::cout << "NO";
}
