#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 1e5 + 2;
int q, w, e, r;
int a[N], b[N];
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> q >> w >> e >> r;
  for (int i = 1; i <= q; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= w; i++) {
    cin >> b[i];
  }
  sort(a + 1, a + q + 1);
  sort(b + 1, b + w + 1);
  if (a[e] < b[w - r + 1]) {
    cout << "YES"
         << "\n";
    return 0;
  }
  cout << "NO"
       << "\n";
  return 0;
}
