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