#include <bits/stdc++.h>
using namespace std;
const int maxn = 1510;
int a[maxn], dp[maxn][maxn], sum[maxn];
pair<int, int> sec[maxn];
vector<int> as;
int n, s, m, k;
priority_queue<pair<int, int> > pq2[maxn];
priority_queue<int> pq[maxn];
inline int check(int limt) {
  memset(dp, 0x8f, sizeof dp);
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1];
    if (a[i] <= as[limt]) sum[i]++;
  }
  for (int i = 1; i <= m; i++) {
    while (!pq[i].empty()) pq[i].pop();
    while (!pq2[i].empty()) pq2[i].pop();
  }
  dp[1][0] = 0;
  dp[1][1] = sum[sec[1].second] - sum[sec[1].first - 1];
  for (int i = 2; i <= s; i++) {
    dp[i][1] = sum[sec[i].second] - sum[sec[i].first - 1];
    dp[i][0] = 0;
    for (int j = 1; j <= min(i - 1, m); j++) {
      pq2[j].push(pair<int, int>(dp[i - 1][j] - sum[sec[i - 1].second],
                                 sec[i - 1].second));
      while (!pq2[j].empty() && pq2[j].top().second < sec[i].first - 1) {
        pq[j].push(pq2[j].top().first + sum[pq2[j].top().second]);
        pq2[j].pop();
      }
    }
    for (int j = 2; j <= min(m, i); j++) {
      if (!pq2[j - 1].empty())
        dp[i][j] = max(dp[i][j], pq2[j - 1].top().first + sum[sec[i].second]);
      if (!pq[j - 1].empty())
        dp[i][j] = max(dp[i][j], pq[j - 1].top() + sum[sec[i].second] -
                                     sum[sec[i].first - 1]);
    }
  }
  int max_dp = -1;
  for (int i = 1; i <= s; i++)
    for (int j = 1; j <= m; j++) max_dp = max(max_dp, dp[i][j]);
  return max_dp;
}
int main() {
  scanf("%d%d%d%d", &n, &s, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    as.push_back(a[i]);
  }
  as.push_back(1000000001);
  sort(as.begin(), as.end());
  as.erase(unique(as.begin(), as.end()), as.end());
  for (int i = 1; i <= s; i++) scanf("%d%d", &sec[i].first, &sec[i].second);
  sort(sec + 1, sec + 1 + s);
  int l = 0, r = (int)as.size() - 1;
  if (check(r) < k) {
    puts("-1");
  } else {
    while (l != r) {
      int mid = (l + r) >> 1;
      if (check(mid) >= k)
        r = mid;
      else
        l = mid + 1;
    }
    printf("%d\n", as[r]);
  }
  return 0;
}
