#include <bits/stdc++.h>
using namespace std;
int main() {
  int n1, n2;
  cin >> n1 >> n2;
  int k, m;
  cin >> k >> m;
  long long a[n1], b[n2];
  for (int i = 0; i < n1; i++) cin >> a[i];
  for (int i = 0; i < n2; i++) cin >> b[i];
  int count = 0;
  for (int i = 0; i < n1; i++) {
    if (a[i] >= b[n2 - m]) break;
    count++;
    if (count >= k) break;
  }
  if (count >= k && n2 >= m)
    cout << "YES\n";
  else
    cout << "NO\n";
}
