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