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