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