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