#include <bits/stdc++.h>
using namespace std;
long long i, s, r, t, a[1000000], na, nb, m, k, c, e, b[1000000];
int main() {
  cin >> na >> nb;
  cin >> k >> m;
  for (i = 0; i < na; i++) cin >> a[i];
  for (i = 0; i < nb; i++) cin >> b[i];
  sort(a, a + na);
  sort(b, b + nb);
  if (a[k - 1] < b[nb - m])
    cout << "YES";
  else
    cout << "NO";
}
