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