#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, s, m, k;
  cin >> n >> s >> m >> k;
  vector<int> a(n);
  vector<pair<int, int>> segments(s);
  for (auto& x : a) {
    cin >> x;
  }
  for (auto& seg : segments) {
    cin >> seg.first >> seg.second;
    --seg.first;
    --seg.second;
  }
  sort(segments.begin(), segments.end(),
       [](const pair<int, int>& p1, const pair<int, int>& p2) {
         return p1.second < p2.second;
       });
  vector<int> crossPrev(s);
  vector<int> noCrossPrev(s);
  for (int i = 0; i < s; ++i) {
    int best = -1;
    for (int j = 0; j < i; ++j) {
      if (segments[j].second >= segments[i].first &&
          (best == -1 || segments[best].first > segments[j].first)) {
        best = j;
      }
    }
    if (best != -1 && segments[best].first >= segments[i].first) {
      best = -1;
    }
    crossPrev[i] = best;
    int bestNoCrossPrev = -1;
    for (int j = 0; j < i; ++j) {
      if (segments[j].second < segments[i].first) {
        bestNoCrossPrev = j;
      }
    }
    noCrossPrev[i] = bestNoCrossPrev;
  }
  int l = 0, r = 1000000009;
  while (r - l > 1) {
    int curValue = (l + r) / 2;
    vector<vector<int>> din(s + 1, vector<int>(m + 1));
    vector<vector<int>> dinMax(s + 1, vector<int>(m + 1));
    din[0][0] = 0;
    vector<int> cnt(s);
    for (int i = 0; i < s; ++i) {
      for (int j = segments[i].first; j <= segments[i].second; ++j) {
        if (a[j] <= curValue) {
          ++cnt[i];
        }
      }
    }
    vector<int> prefSum(n);
    for (int i = 0; i < n; ++i) {
      prefSum[i] = (i > 0 ? prefSum[i - 1] : 0) + (a[i] <= curValue);
    }
    for (int i = 1; i <= s; ++i) {
      for (int j = 1; j <= m; ++j) {
        din[i][j] = din[i][j - 1];
        int lastVal = cnt[i - 1];
        if (j > 1) {
          int prev1 = crossPrev[i - 1];
          if (prev1 != -1) {
            int prevVal = din[prev1 + 1][j - 1];
            prevVal -=
                prefSum[segments[prev1].second] -
                (segments[i - 1].first > 0 ? prefSum[segments[i - 1].first - 1]
                                           : 0);
            din[i][j] = max(din[i][j], prevVal + lastVal);
          }
          int prev2 = noCrossPrev[i - 1];
          if (prev2 != -1) {
            din[i][j] = max(din[i][j], dinMax[prev2 + 1][j - 1] + lastVal);
          }
        } else {
          din[i][j] = max(din[i][j], lastVal);
        }
        dinMax[i][j] = max(dinMax[i - 1][j], din[i][j]);
      }
    }
    if (dinMax[s][m] >= k) {
      r = curValue;
    } else {
      l = curValue;
    }
  }
  if (r == 1000000009) {
    r = -1;
  }
  cout << r << endl;
}
