#include <bits/stdc++.h>
using namespace std;
const long long N = 1600, NM = 1 << 20 + 2, MOD = 1e9 + 7, INF = 3e18 + 10,
                SQ = 550, LOG = 25;
long long n, m, x1, x2, d, z, t, dp[N][N], a[N], b[N], lmost[N], nxt[N],
    premax[N][N], y2, mini, ptr, x, y, ptr1, ptr2, ans, s, k;
pair<long long, long long> pr[N];
bool cmp(pair<long long, long long> x, pair<long long, long long> y) {
  if (x.second == y.second) return (x.first < y.first);
  return (x.second < y.second);
}
bool check(long long x) {
  for (int i = 1; i <= n; i++) b[i] = (a[i] <= x) + b[i - 1];
  for (int i = 0; i <= s; i++)
    for (int j = 0; j <= m; j++) dp[i][j] = premax[i][j] = -INF;
  for (int i = 1; i <= s; i++) {
    dp[i][1] = b[pr[i].second] - b[pr[i].first - 1];
    premax[i][1] = max(premax[i][1], dp[i][1]);
    for (int j = 2; j <= m; j++) {
      if (nxt[i])
        dp[i][j] =
            max(premax[nxt[i]][j - 1] + b[pr[i].second] - b[pr[i].first - 1],
                dp[i][j]);
      if (lmost[i])
        dp[i][j] =
            max(dp[i][j], dp[lmost[i]][j - 1] + b[pr[i].second] -
                              b[pr[i].first - 1] -
                              (b[min(pr[i].second, pr[lmost[i]].second)] -
                               b[max(pr[i].first, pr[lmost[i]].first) - 1]));
      premax[i][j] = max(premax[i][j], dp[i][j]);
    }
    for (int j = 1; j <= m; j++)
      premax[i][j] = max(premax[i][j], premax[i - 1][j]);
  }
  for (int i = 1; i <= s; i++) {
    for (int j = 1; j <= m; j++)
      if (dp[i][j] >= k) {
        return 1;
      }
  }
  return 0;
}
int main() {
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= s; i++) {
    cin >> pr[i].first >> pr[i].second;
  }
  sort(pr + 1, pr + s + 1, cmp);
  for (int i = 1; i <= s; i++) {
    for (int j = i - 1; j; j--) {
      if (i == j) continue;
      if (pr[j].second < pr[i].first) {
        nxt[i] = j;
        break;
      }
    }
    for (int j = 1; j < i; j++) {
      if (pr[j].second >= pr[i].first && pr[j].second < pr[i].second) {
        if (lmost[i]) {
          if (pr[lmost[i]].first > pr[j].first) {
            lmost[i] = j;
          }
        } else {
          lmost[i] = j;
        }
      }
    }
  }
  long long b = 0, e = 1e9, mid;
  while (e - b > 1) {
    mid = e + b >> 1;
    if (check(mid))
      e = mid;
    else
      b = mid;
  }
  cout << (check(e) ? e : -1);
}
