#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int x, y, k, m;
  cin >> x >> y >> k >> m;
  int arr[x], ar[y];
  for (int i = 0; i < x; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < y; i++) {
    cin >> ar[i];
  }
  reverse(ar, ar + y);
  if (arr[k - 1] < ar[m - 1]) {
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
}
