#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  int k, m;
  cin >> k >> m;
  vector<int> a(A);
  vector<int> b(B);
  for (int i = 0; i < A; i++) scanf("%d", &a[i]);
  for (int i = 0; i < B; i++) scanf("%d", &b[i]);
  int y = a[k - 1];
  sort(b.rbegin(), b.rend());
  int j = b[m - 1];
  if (j > y)
    printf("YES");
  else
    printf("NO");
  return 0;
}
