#include <bits/stdc++.h>
using namespace std;
const int maxN = 1502;
pair<int, int> in[maxN];
int T[maxN], pref[maxN], vals[maxN], dp[maxN][maxN][2], Prev[maxN];
vector<pair<int, int> > invs;
int n, s, m, k;
int f(int a, int b) { return pref[b] - pref[a - 1]; }
inline void remax(int& a, int b) { a = max(a, b); }
bool ct_dp(int res) {
  for (int(i) = (1); (i) < (n + 1); (i)++)
    pref[i] = pref[i - 1] + (T[i] <= res ? 1 : 0);
  for (int(i) = (1); (i) < (invs.size()); (i)++) {
    dp[i][1][1] = f(invs[i].first, invs[i].second);
    dp[i][1][0] = max(dp[i - 1][1][0], dp[i - 1][1][1]);
    int a = f(invs[i].first, invs[i].second);
    for (int(j) = (2); (j) < (min(i + 1, m + 1)); (j)++) {
      dp[i][j][0] = max(dp[i - 1][j][0], dp[i - 1][j][1]);
      int w = Prev[i] + 1;
      if (w == i)
        dp[i][j][1] = max(dp[i - 1][j - 1][0], dp[i - 1][j - 1][1]) + a;
      else
        dp[i][j][1] =
            max(dp[w][j - 1][0] + a,
                dp[w][j - 1][1] + f(invs[w].second + 1, invs[i].second));
    }
  }
  for (int(i) = (1); (i) < (m + 1); (i)++)
    if (dp[invs.size() - 1][i][0] >= k or dp[invs.size() - 1][i][1] >= k)
      return true;
  return false;
}
int main() {
  scanf("%d%d%d%d", &n, &s, &m, &k);
  for (int(i) = (1); (i) < (n + 1); (i)++) scanf("%d", T + i), vals[i] = T[i];
  for (int(i) = (0); (i) < (s); (i)++)
    scanf("%d%d", &in[i].first, &in[i].second), in[i].second *= -1;
  sort(in, in + s);
  int mxe = 0;
  invs.push_back({0, 0});
  for (int(i) = (0); (i) < (s); (i)++) {
    in[i].second *= -1;
    if (in[i].second <= mxe) continue;
    mxe = in[i].second;
    invs.push_back(in[i]);
  }
  m = min(m, (int)invs.size() - 1);
  for (int(i) = (1); (i) < (invs.size()); (i)++)
    for (Prev[i] = i; invs[Prev[i]].second >= invs[i].first; Prev[i]--)
      ;
  sort(vals + 1, vals + n + 1);
  vals[n + 1] = -1;
  int begin = 0, end = n + 1;
  while (end - begin > 1) {
    int middle = begin + end >> 1;
    ct_dp(vals[middle]) ? end = middle : begin = middle;
  }
  printf("%d\n", vals[end]);
  return 0;
}
