#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, y, z, l = 0, j, k = 0, c;
  cin >> x >> y >> z >> c;
  long long a[x], b[y], i;
  for (i = 0; i < x; i++) cin >> a[i];
  for (i = 0; i < y; i++) cin >> b[i];
  sort(a, a + x);
  sort(b, b + y);
  k = a[z - 1];
  l = b[y - c];
  if (k < l)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
