#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using uint = unsigned int;
using rl = double;
using pii = pair<int, int>;
const int MAXN = 1509;
int n, s, m, k;
int a[MAXN];
int p[MAXN];
int cntE;
map<int, int> amap;
map<int, int> mapb;
int na[MAXN];
struct Seg {
  int l, r;
  int prs;
  bool operator<(const Seg& rhs) const {
    return (l != rhs.l) ? l < rhs.l : r < rhs.r;
  }
} seg[MAXN];
int sperm[MAXN];
int psum[MAXN];
int dp[MAXN][MAXN];
bool Check(int mid) {
  psum[0] = 0;
  for (int i = 1; i <= n; i++) {
    psum[i] = (na[i] <= mid) ? 1 : 0;
    psum[i] += psum[i - 1];
  }
  for (int i = 1; i <= s; i++) {
    dp[i][1] = psum[seg[i].r] - psum[seg[i].l - 1];
    if (dp[i][1] >= k) return true;
  }
  for (int i = 2; i <= m; i++) {
    int lp = 1;
    int bestVal = 0;
    for (int j = 1; j <= s; j++) {
      while (lp <= s && seg[sperm[lp]].r < seg[j].l) {
        bestVal = max(bestVal, dp[sperm[lp]][i - 1]);
        lp++;
      }
      dp[j][i] = bestVal + psum[seg[j].r] - psum[seg[j].l - 1];
      if (seg[j].prs) {
        int tansw =
            dp[seg[j].prs][i - 1] + psum[seg[j].r] - psum[seg[seg[j].prs].r];
        dp[j][i] = max(dp[j][i], tansw);
      }
      if (dp[j][i] >= k) return true;
    }
  }
  return false;
}
int main() {
  scanf("%d %d %d %d", &n, &s, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    amap[a[i]] = 0;
  }
  for (auto& t : amap) {
    t.second = ++cntE;
    mapb[t.second] = t.first;
  }
  for (int i = 1; i <= n; i++) {
    na[i] = amap[a[i]];
  }
  for (int i = 1; i <= s; i++) {
    int l, r;
    scanf("%d %d", &l, &r);
    seg[i].l = l;
    seg[i].r = r;
    sperm[i] = i;
  }
  sort(seg + 1, seg + 1 + s);
  sort(sperm + 1, sperm + 1 + s,
       [](int aa, int bb) { return seg[aa].r < seg[bb].r; });
  for (int i = 1; i <= s; i++) {
    for (int j = 1; j < i; j++) {
      if (seg[j].r < seg[i].l || seg[i].r < seg[j].r) continue;
      if (seg[i].prs == 0 || seg[j].l < seg[seg[i].prs].l) seg[i].prs = j;
    }
  }
  int L = 1, R = cntE;
  while (L <= R) {
    int mid = (L + R) / 2;
    if (Check(mid))
      R = mid - 1;
    else
      L = mid + 1;
  }
  if (L == cntE + 1)
    printf("-1\n");
  else
    printf("%d\n", mapb[L]);
}
