#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, n1;
  cin >> n >> n1;
  long long k, m;
  cin >> k >> m;
  long long a[n + 4], b[n1 + 4];
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n1; i++) cin >> b[i];
  vector<long long> aa, bb;
  for (long long i = 0; i < k; i++) aa.push_back(a[i]);
  for (long long i = n1 - 1; i >= n1 - m; i--) bb.push_back(b[i]);
  sort(aa.begin(), aa.end());
  sort(bb.begin(), bb.end());
  if (aa[k - 1] < bb[0])
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
