#include <bits/stdc++.h>
using namespace std;
const int MAX = 100001;
int a[MAX];
int b[MAX];
int s1, s2;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n1, n2;
  cin >> n1 >> n2;
  int k, m;
  cin >> k >> m;
  for (int i = 0; i < n1; i++) cin >> a[i];
  for (int i = 0; i < n2; i++) cin >> b[i];
  if (a[k - 1] < b[n2 - m])
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
