#include <bits/stdc++.h>
using namespace std;
const int N = 1505, INF = (int)1e9 + 500;
int n, s, m, k;
int a[N], psum[N];
int dp[N][N], pdp[N][N];
int it[N], nit[N];
pair<int, int> seg[N];
bool cmp(pair<int, int> p1, pair<int, int> p2) {
  return p1.second != p2.second ? p1.second < p2.second : p1.first < p2.first;
}
bool check(int val) {
  for (int i = 1; i <= n; i++) {
    psum[i] = (a[i] <= val) + psum[i - 1];
  }
  seg[0].first = seg[0].second = INF;
  fill(it, it + s + 1, 0);
  fill(nit, nit + s + 1, 0);
  for (int i = 1; i <= s; i++) {
    for (int j = 1; j < i; j++) {
      if (seg[j].second >= seg[i].first &&
          seg[j].first < min(seg[i].first, seg[it[i]].first))
        it[i] = j;
      if (seg[j].second < seg[i].first) nit[i] = max(nit[i], j);
    }
  }
  memset(dp, -1, sizeof(dp));
  int mx = 0;
  for (int i = 1; i <= s; i++) {
    for (int j = 1; j <= m; j++) {
      if (j == 1)
        dp[i][j] = psum[seg[i].second] - psum[seg[i].first - 1];
      else {
        if (it[i] != 0 && dp[it[i]][j - 1] != -1)
          dp[i][j] = max(dp[i][j], dp[it[i]][j - 1] + psum[seg[i].second] -
                                       psum[seg[it[i]].second]);
        if (nit[i] != 0 && dp[nit[i]][j - 1] != -1)
          dp[i][j] = max(dp[i][j], pdp[nit[i]][j - 1] + psum[seg[i].second] -
                                       psum[seg[i].first - 1]);
      }
      pdp[i][j] = max(pdp[i - 1][j], dp[i][j]);
      mx = max(mx, dp[i][j]);
    }
  }
  return mx >= k;
}
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 >> seg[i].first >> seg[i].second;
  sort(seg + 1, seg + s + 1, cmp);
  int l = 0, r = INF, mid;
  while (l + 1 < r) {
    mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  cout << (r == INF ? -1 : r) << endl;
}
