#include <bits/stdc++.h>
using namespace std;
int n, m, p, q, a[100010], b[100010];
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  cin >> p >> q;
  for (int i = (1), _b = (n); i <= _b; i++) cin >> a[i];
  for (int i = (1), _b = (m); i <= _b; i++) cin >> b[i];
  if (a[p] < b[m - q + 1])
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
