#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n1, n2, k, m, i, x;
  long long cnt, loc;
  cin >> n1 >> n2 >> k >> m;
  vector<pair<long long, long long> > v;
  for (i = 0; i < n1; i++) {
    cin >> x;
    v.push_back(make_pair(x, 1));
  }
  for (i = 0; i < n2; i++) {
    cin >> x;
    v.push_back(make_pair(x, 2));
  }
  sort(v.begin(), v.end());
  cnt = 0;
  for (i = 0; i < v.size(); i++) {
    if (v[i].second == 1) cnt++;
    if (cnt == k) {
      loc = i;
      break;
    }
  }
  int b = 0;
  long long ans = 0;
  for (i = loc; i < v.size(); i++) {
    if (v[i].second == 2) {
      if (v[i].first != v[loc].first) ans++;
    }
    if (ans == m) {
      b = 1;
      break;
    }
  }
  if (cnt == k and b == 1)
    printf("YES\n");
  else
    printf("NO\n");
}
