#include <bits/stdc++.h>
using namespace std;
int A, B, nA, nB, m, k;
int main() {
  cin >> nA >> nB >> k >> m;
  int i;
  for (i = 0; i < k; i++) cin >> A;
  k = A;
  for (; i < nA; i++) cin >> A;
  for (i = 0; i <= nB - m; i++) cin >> B;
  if (k < B)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
