#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[100001], b[100001], k, m, n1, n2, i, j;
  cin >> n1 >> n2;
  cin >> k >> m;
  for (i = 0; i < n1; i++) cin >> a[i];
  for (j = 0; j < n2; j++) cin >> b[j];
  sort(a, a + n1);
  sort(b, b + n2);
  if (a[k - 1] < b[0] || a[k - 1] < b[n2 - m])
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
