#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000,100000000000")
const int INF = 1e9;
const double cp = 2 * asin(1.0);
const double eps = 1e-9;
const long long mod = 1000000000;
using namespace std;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n, m, x, y;
  cin >> n >> m >> x >> y;
  vector<long long> a(n), b(m);
  for (int(i) = 0; (i) < (n); i++) cin >> a[i];
  for (int(i) = 0; (i) < (m); i++) cin >> b[i];
  sort((a).begin(), (a).end());
  sort((b).begin(), (b).end());
  if (a[x - 1] >= b[m - y])
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
