#include <bits/stdc++.h>
using namespace std;
int main() {
  int s1, s2;
  int n1, n2;
  cin >> s1 >> s2;
  cin >> n1 >> n2;
  int a[s1];
  int b[s2];
  int c = 0;
  while (c < s1) {
    cin >> a[c];
    c++;
  }
  c = 0;
  while (c < s2) {
    cin >> b[c];
    c++;
  }
  sort(a, a + s1);
  sort(b, b + s2);
  int i1 = n1 - 1;
  int i2 = s2 - n2;
  if (a[i1] < b[i2]) {
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
}
