#include <bits/stdc++.h>
using namespace std;
const int mo = 1000000009;
int a[300100], b[300100], n, m, k, l;
int main() {
  cin.sync_with_stdio(false);
  cin >> n >> m >> k >> l;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= m; ++i) cin >> b[i];
  sort(a + 1, a + n + 1);
  sort(b + 1, b + m + 1);
  if (a[k] < b[m - l + 1]) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
