#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
const int INF = 2147483647;
const long long LINF = 9223372036854775807;
const int dx[] = {1, -1, 0, 0}, dy[] = {0, 0, 1, -1};
int n1, n2, k, m, a[MAXN], b[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n1 >> n2 >> k >> m;
  for (int(i) = 0; i < (n1); i++) cin >> a[i];
  for (int(i) = 0; i < (n2); i++) cin >> b[i];
  if (a[k - 1] < b[n2 - m])
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
