#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  int n, m;
  cin >> a >> b >> n >> m;
  int A[a];
  int B[b];
  for (int i = 0; i < a; i++) cin >> A[i];
  for (int i = 0; i < b; i++) cin >> B[i];
  bool t1 = 0;
  bool t2 = 0;
  int index1, index2;
  for (index1 = 0; index1 < b; index1++)
    if (A[n - 1] < B[index1]) break;
  for (index2 = 0; index2 < a; index2++)
    if (B[m - 1] < A[index2]) break;
  if (b - index1 + 1 > m)
    cout << "YES";
  else
    cout << "NO";
}
