#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  cin >> n >> m;
  long long int a, b;
  cin >> a >> b;
  vector<long long int> v1(n);
  vector<long long int> v2(m);
  for (int i = 0; i < n; i++) cin >> v1[i];
  for (int i = 0; i < m; i++) cin >> v2[i];
  if (v1[a - 1] < v2[m - b])
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
