#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int N = (int)1e6 + 7, mod = 1000000007, M = 2e9;
int n, m, x, y, a[N], b[N];
vector<int> ans[2];
int main() {
  cin >> n >> m >> x >> y;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < m; i++) cin >> b[i];
  sort(a, a + n);
  sort(b, b + m);
  if (a[x - 1] < b[m - y])
    puts("YES");
  else
    puts("NO");
  return 0;
}
