#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
int main() {
  int a, b;
  cin >> a >> b;
  int ma[N], mb[N];
  int k, m;
  cin >> k >> m;
  vector<int> va, vb;
  for (int i = 0; i < a; i++) {
    cin >> ma[i];
    if (i < k) va.push_back(ma[i]);
  }
  for (int i = 0; i < b; i++) {
    cin >> mb[i];
    if (i >= b - m) vb.push_back(mb[i]);
  }
  if ((*va.rbegin()) < (*vb.begin())) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
