#include <bits/stdc++.h>
using namespace std;
long long n, m, s, k;
long long a[1500 + 1];
long long l[1500 + 1];
long long r[1500 + 1];
bool ok(long long x) {
  long long b[n + 1];
  for (long long i = 1; i <= n; i++) {
    if (a[i] <= x)
      b[i] = 1;
    else
      b[i] = 0;
  }
  long long suma[n + 1][n + 1];
  for (long long a = 0; a <= n; a++) {
    for (long long b = 0; b <= n; b++) {
      suma[a][b] = 0;
    }
  }
  long long SUM[n + 1];
  SUM[0] = 0;
  for (long long i = 1; i <= n; i++) SUM[i] = SUM[i - 1] + b[i];
  for (long long i = 1; i <= s; i++) {
    for (long long L = l[i]; L <= r[i]; L++) {
      long long R = r[i];
      suma[L][R] = max(suma[L][R], SUM[R] - SUM[L - 1]);
    }
  }
  for (long long sz = 2; sz <= n; sz++) {
    for (long long l = 1; l + sz - 1 <= n; l++) {
      long long r = l + sz - 1;
      suma[l][r] = max({suma[l][r], suma[l + 1][r], suma[l][r - 1]});
    }
  }
  long long DP[n + 2][m + 2];
  for (long long i = 0; i <= n; i++) {
    for (long long j = 0; j <= m; j++) {
      DP[i][j] = 0;
    }
  }
  multiset<long long> RR;
  vector<long long> plus[n + 5];
  vector<long long> minu[n + 5];
  for (long long j = 1; j <= s; j++) {
    plus[l[j] - 1].push_back(r[j]);
    minu[r[j] + 1].push_back(r[j]);
  }
  for (long long r = 0; r <= n; r++) {
    for (long long RRR : plus[r]) RR.insert(RRR);
    for (long long RRR : minu[r]) RR.erase(RR.find(RRR));
    long long r_ = -1;
    if (!RR.empty()) r_ = *(--RR.end());
    for (long long a = 0; a < m; a++) {
      if (r_ >= r) {
        DP[r_][a + 1] = max(DP[r_][a + 1], DP[r][a] + SUM[r_] - SUM[r]);
      }
      DP[r + 1][a] = max(DP[r + 1][a], DP[r][a]);
    }
  }
  for (long long i = 0; i <= n; i++) {
    for (long long j = 0; j <= m; j++) {
      if (DP[i][m] >= k) return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> s >> m >> k;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= s; i++) cin >> l[i] >> r[i];
  long long lo = 0;
  long long hi = 1000000009;
  while (lo < hi) {
    long long m = (lo + hi) / 2;
    if (ok(m)) {
      hi = m;
    } else
      lo = m + 1;
  }
  long long m = (lo + hi) / 2;
  if (m > 1000000000) m = -1;
  cout << m << "\n";
}
