#include <bits/stdc++.h>
using namespace std;
long long n, m, k, i, j, l, r, c[100000], a[100000], x, b[100000], d[100000];
int main() {
  cin >> n >> m >> k >> l;
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < m; i++) cin >> b[i];
  if (a[k - 1] < b[m - l])
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
