#include <bits/stdc++.h>
using namespace std;
int main() {
  int Na, Nb, k, m;
  vector<int> A, B;
  cin >> Na >> Nb >> k >> m;
  for (int i = 0; i < Na; i++) {
    int tmp;
    cin >> tmp;
    A.push_back(tmp);
  }
  for (int i = 0; i < Nb; i++) {
    int tmp;
    cin >> tmp;
    B.push_back(tmp);
  }
  if (A[k - 1] < B[B.size() - m])
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
