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