#include <bits/stdc++.h>
using namespace std;
const int N = 1000 * 100 + 10;
int a[N], b[N];
int main() {
  int na, nb, m, k;
  cin >> na >> nb >> m >> k;
  for (int i = 0; i < na; i++) cin >> a[i];
  for (int i = 0; i < nb; i++) cin >> b[i];
  return cout << (a[m - 1] < b[nb - k] ? "YES\n" : "NO\n"), EXIT_SUCCESS;
}
