#include <bits/stdc++.h>
const int inf = (1ll << 31) - 1;
const int maxn = (int)1e5 + 10;
using namespace std;
int n1 = 0, n2 = 0, dat1[110000], dat2[110000];
int k = 0, m = 0;
int main() {
  while (scanf("%d%d", &n1, &n2) != EOF) {
    scanf("%d%d", &k, &m);
    for (int i = 0; i < n1; i++) {
      cin >> dat1[i];
    }
    for (int i = 0; i < n2; i++) {
      cin >> dat2[i];
    }
    int add1 = 0, add2 = 0;
    int first = 1;
    int minn2 = inf, maxn2 = -inf;
    for (int j = n2 - 1; j >= n2 - m; j--) {
      if (minn2 > dat2[j]) {
        minn2 = dat2[j];
      }
      if (maxn2 < dat2[j]) {
        maxn2 = dat2[j];
      }
    }
    for (int i = 0; i < k; i++) {
      if (dat1[i] >= minn2) {
        first = 0;
      }
    }
    if (first) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
