#include <bits/stdc++.h>
using namespace std;
int aa[100007], bb[100007];
int main() {
  int n, m;
  cin >> n >> m;
  int a, b;
  cin >> a >> b;
  for (int i = 0; i < n; i++) {
    cin >> aa[i];
  }
  int cc = 0;
  for (int i = 0; i < m; i++) {
    cin >> bb[i];
  }
  bool ok = 0;
  if (n < a || m < b) {
    cout << "NO";
    return 0;
  }
  if (bb[m - b] > aa[a - 1])
    ok = 1;
  else
    ok = 0;
  if (!ok)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
