#include <bits/stdc++.h>
using namespace std;
const int N = 1505;
int n, s, m, k, a[N], ind[N], prefsum[N], dp[N][N];
pair<int, int> seg[N];
bool useless[N], covered[N];
bool cmp_ind(int x, int y) { return a[x] < a[y]; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 0; i < s; i++) {
    cin >> seg[i].first >> seg[i].second;
    for (int j = seg[i].first; j <= seg[i].second; j++) covered[j] = true;
    seg[i].second *= -1;
  }
  sort(seg, seg + s);
  int end = -1;
  for (int i = 0; i < s; i++) {
    seg[i].second *= -1;
    if (seg[i].second <= end)
      useless[i] = true;
    else
      end = seg[i].second;
  }
  int news = 0;
  for (int i = 0; i < s; i++)
    if (!useless[i]) seg[news++] = seg[i];
  s = news;
  for (int i = 0; i < n; i++) ind[i] = i + 1;
  sort(ind, ind + n, cmp_ind);
  int beg = 0;
  end = n;
  while (beg < end) {
    int cen = (beg + end) / 2;
    int val = a[ind[cen]];
    bool enough = false;
    prefsum[0] = 0;
    for (int i = 1; i <= n; i++) prefsum[i] = prefsum[i - 1] + (a[i] <= val);
    for (int i = 1; i <= m; i++) {
      dp[i][n + 1] = 0;
      int x = s - 1;
      for (int j = n; j >= 1; j--) {
        dp[i][j] = max(dp[i][j + 1], dp[i - 1][j]);
        while (x >= 0 && seg[x].first > j) x--;
        if (x >= 0) {
          int inside = prefsum[seg[x].second] - prefsum[j - 1];
          dp[i][j] = max(dp[i][j], dp[i - 1][seg[x].second + 1] + inside);
        }
      }
    }
    if (dp[m][1] >= k)
      end = cen;
    else
      beg = cen + 1;
  }
  cout << (beg == n ? -1 : a[ind[beg]]) << "\n";
  return 0;
}
