#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int a[N], b[N];
int main() {
  int n, m;
  ios::sync_with_stdio(false);
  cin >> n >> m;
  int x, y;
  cin >> x >> y;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= m; i++) cin >> b[i];
  if (a[x] < b[m - y + 1])
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
