#include <bits/stdc++.h>
using namespace std;
int n, m, k, l, u, v;
bool ans = true;
vector<long long> a;
vector<long long> b;
int main() {
  cin >> n >> m >> k >> l;
  for (int i = 0; i < n; ++i) {
    cin >> u;
    a.push_back(u);
  }
  for (int i = 0; i < m; ++i) {
    cin >> v;
    b.push_back(v);
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  if (a[k - 1] < b[m - l])
    cout << "YES";
  else
    cout << "NO";
}
