#include <bits/stdc++.h>
using namespace std;
long long n, v, k, m, a[200000], b[200000], i, j;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> v;
  cin >> k >> m;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (i = 1; i <= v; i++) {
    cin >> b[i];
  }
  if (a[k] < b[v - m + 1])
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
  return 0;
}
