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