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