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