#include <bits/stdc++.h>
using namespace std;
int prevfar[1500], prevoverlap[1500], nums[1500], psum[1501];
vector<pair<int, int> > ranges;
int memo[1500][1501];
int dp(int idx, int avail) {
  if (avail == 0) return 0;
  if (idx == -1) return 0;
  if (memo[idx][avail] != -1) return memo[idx][avail];
  int ans = dp(idx - 1, avail);
  ans = max(ans, dp(prevfar[idx], avail - 1) + psum[ranges[idx].second] -
                     psum[ranges[idx].first - 1]);
  if (prevoverlap[idx] != -1)
    ans = max(ans, dp(prevoverlap[idx], avail - 1) + psum[ranges[idx].second] -
                       psum[ranges[prevoverlap[idx]].second]);
  return memo[idx][avail] = ans;
}
int main() {
  int n, s, m, k;
  cin >> n >> s >> m >> k;
  for (int i = 0; i < n; i++) cin >> nums[i];
  for (int i = 0; i < s; i++) {
    int a, b;
    cin >> a >> b;
    ranges.push_back({a, b});
  }
  sort(ranges.begin(), ranges.end(),
       [](pair<int, int> a, pair<int, int> b) { return a.second < b.second; });
  memset(prevfar, -1, sizeof prevfar);
  memset(prevoverlap, -1, sizeof prevoverlap);
  for (int i = 0; i < s; i++) {
    for (int j = 0; j < i; j++) {
      if (ranges[j].second < ranges[i].first) {
        prevfar[i] = max(prevfar[i], j);
      } else {
        if (prevoverlap[i] == -1)
          prevoverlap[i] = j;
        else if (ranges[prevoverlap[i]].first >= ranges[j].first)
          prevoverlap[i] = j;
      }
    }
  }
  int mini = 0, maxi = 1000000000;
  while (maxi - mini > 1) {
    int mid = (maxi + mini) / 2;
    memset(memo, -1, sizeof memo);
    psum[0] = 0;
    for (int i = 0; i < n; i++) {
      psum[i + 1] = nums[i] <= mid;
      psum[i + 1] += psum[i];
    }
    if (dp(s - 1, m) >= k)
      maxi = mid;
    else
      mini = mid;
  }
  memset(memo, -1, sizeof memo);
  psum[0] = 0;
  for (int i = 0; i < n; i++) {
    psum[i + 1] = nums[i] <= maxi;
    psum[i + 1] += psum[i];
  }
  if (dp(s - 1, m) < k)
    cout << "-1\n";
  else
    cout << maxi << '\n';
}
