#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int na, nb, k, m;
  cin >> na >> nb >> k >> m;
  int x, y;
  for (int i = 1; i <= na; ++i) {
    int t;
    cin >> t;
    if (i == k) x = t;
  }
  for (int i = 1; i <= nb; ++i) {
    int t;
    cin >> t;
    if (i == nb - m + 1) y = t;
  }
  if (x < y)
    cout << "YES";
  else
    cout << "NO";
}
