#include <bits/stdc++.h>
using namespace std;
const int MN = 1555, inf = 1000000005, mod = 1000000007;
const long long INF = 1000000000000000005LL;
int n, m, s, k;
int pref[MN], dp[MN][MN], A[MN], pos[MN], naj[MN];
pair<int, int> P[MN];
inline int suma(int a, int b) {
  if (a > b) return 0;
  return (pref[b] - pref[a - 1]);
}
int check(int v) {
  int res = 0;
  for (int i = 1; i <= n; ++i) pref[i] = pref[i - 1] + (A[i] <= v ? 1 : 0);
  for (int i = 1; i <= m; ++i)
    for (int j = 1; j <= n; ++j) {
      dp[i][j] = dp[i][j - 1];
      if (naj[j] != inf) {
        dp[i][j] = max(dp[i][j], dp[i - 1][naj[j] - 1] + suma(naj[j], j));
        dp[i][j] = max(dp[i][j], dp[i - 1][pos[j]] + suma(pos[j] + 1, j));
      }
      res = max(res, dp[i][j]);
    }
  return res;
}
int bs() {
  int zd = 0, zg = inf;
  while (zd != zg) {
    int mid = (zd + zg) >> 1;
    if (check(mid) < k)
      zd = mid + 1;
    else
      zg = mid;
  }
  return zd;
}
int main() {
  scanf("%d%d%d%d", &n, &s, &m, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &A[i]);
    naj[i] = inf;
  }
  for (int i = 1; i <= s; ++i) {
    int l, r;
    scanf("%d%d", &l, &r);
    P[i] = {l, r};
    naj[r] = min(naj[r], l);
  }
  for (int i = 1; i <= s; ++i)
    if (P[i].first == naj[P[i].second]) {
      int curNaj = inf;
      for (int j = P[i].second; j >= P[i].first; --j) {
        if (naj[j] < curNaj) {
          curNaj = naj[j];
          pos[P[i].second] = j;
        }
      }
    }
  int ans = bs();
  if (ans == inf) ans = -1;
  printf("%d", ans);
}
