#include <bits/stdc++.h>
using namespace std;
int const maxN = 1e5 + 20;
int nA, nB, a[maxN], b[maxN], k, m;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> nA >> nB >> k >> m;
  for (int i = (int)(0); i < (int)(nA); i++) cin >> a[i];
  for (int i = (int)(0); i < (int)(nB); i++) cin >> b[i];
  sort(a, a + nA);
  sort(b, b + nB);
  return (a[k - 1] < b[nB - m] ? cout << "YES" : cout << "NO"), 0;
}
