#include <bits/stdc++.h>
using namespace std;
const int N_MAX = 1505;
int N, S, M, K;
int numbers[N_MAX], farthest_left[N_MAX];
int partial[N_MAX], sorted[N_MAX];
int dp[N_MAX][N_MAX];
void maximize(int &a, int b) {
  if (b > a) a = b;
}
bool works(int cutoff) {
  for (int i = 0; i < N; i++)
    partial[i + 1] = partial[i] + (numbers[i] <= cutoff ? 1 : 0);
  memset(dp, 0, sizeof(dp));
  int answer = 0;
  for (int s = 1; s <= M; s++)
    for (int i = 1; i <= N; i++) {
      maximize(dp[s][i], dp[s - 1][i]);
      maximize(dp[s][i], dp[s][i - 1]);
      maximize(dp[s][i], dp[s - 1][farthest_left[i]] + partial[i] -
                             partial[farthest_left[i]]);
      maximize(answer, dp[s][i]);
    }
  return answer >= K;
}
int main() {
  scanf("%d %d %d %d", &N, &S, &M, &K);
  for (int i = 0; i < N; i++) scanf("%d", &numbers[i]);
  for (int i = 0; i <= N; i++) farthest_left[i] = N;
  for (int i = 0; i < S; i++) {
    int start, end;
    scanf("%d %d", &start, &end);
    start--;
    for (int s = start; s <= end; s++)
      farthest_left[s] = min(farthest_left[s], start);
  }
  memcpy(sorted, numbers, sizeof(numbers));
  sort(sorted, sorted + N);
  int low = 0, high = N;
  while (low < high) {
    int mid = (low + high) / 2;
    if (works(sorted[mid]))
      high = mid;
    else
      low = mid + 1;
  }
  sorted[N] = -1;
  printf("%d\n", sorted[low]);
}
