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