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