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