#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1500 + 10;
int n, s, m, k, a[MAX_N], l[MAX_N], r[MAX_N], dp[MAX_N][MAX_N];
int min_l[MAX_N], p_sum[MAX_N];
void read_input() {
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 0; i < s; i++) cin >> l[i] >> r[i];
}
void solve() {
  for (int i = 0; i <= n; i++) min_l[i] = i + 1;
  for (int i = 0; i < s; i++)
    for (int j = l[i]; j <= r[i]; j++) min_l[j] = min(min_l[j], l[i]);
}
bool is_ok(int t) {
  memset(dp, 0, sizeof dp);
  for (int i = 1; i <= n; i++) p_sum[i] = p_sum[i - 1] + (a[i] <= t);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      dp[i][j] = max(dp[i - 1][j],
                     dp[min_l[i] - 1][j - 1] + p_sum[i] - p_sum[min_l[i] - 1]);
  return dp[n][m] >= k;
}
int find_ans() {
  int L = 0, R = 1e9 + 10;
  while (L < R - 1) {
    int mid = L + R >> 1;
    if (is_ok(mid))
      R = mid;
    else
      L = mid;
  }
  if (is_ok(R))
    return R;
  else
    return -1;
}
void print_output() { cout << find_ans(); }
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  read_input();
  solve();
  print_output();
}
