#include <bits/stdc++.h>
using namespace std;
int main() {
  int n1, n2, k, m;
  int inp;
  cin >> n1 >> n2;
  vector<int> A;
  vector<int> B;
  cin >> k >> m;
  for (int i = 0; i < n1; i++) {
    cin >> inp;
    A.push_back(inp);
  }
  for (int l = 0; l < n2; l++) {
    cin >> inp;
    B.push_back(inp);
  }
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  if (A[k - 1] < B[n2 - m])
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
