#include <bits/stdc++.h>
using namespace std;
int n, m, x, y, a[100500], b[100500];
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
int main() {
  n = read();
  m = read();
  x = read();
  y = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= m; i++) b[i] = read();
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + m);
  if (a[x] < b[m - y + 1])
    puts("YES");
  else
    puts("NO");
  return 0;
}
