#include <bits/stdc++.h>
using namespace std;
int m, n;
int a, b;
int num[100005], num2[100005];
int main() {
  scanf("%d%d", &a, &b);
  scanf("%d%d", &m, &n);
  for (int i = 1; i <= a; i++) scanf("%d", &num[i]);
  for (int j = 1; j <= b; j++) scanf("%d", &num2[j]);
  if (num[m] < num2[b - n + 1])
    printf("YES");
  else
    printf("NO");
  return 0;
}
