#include <bits/stdc++.h>
using namespace std;
const int maxn = 1510;
int n, s, m, k;
int a[maxn], dp[maxn][maxn], val[maxn][maxn], lseg[maxn];
vector<pair<int, int>> segs;
int solve(int x) {
  for (int i = 0; i < s; i++) {
    for (int j = segs[i].first; j <= segs[i].second; j++) {
      if (a[j] <= x)
        val[i][j] = val[i][j - 1] + 1;
      else
        val[i][j] = val[i][j - 1];
    }
  }
  dp[0][0] = 0;
  for (int i = 1; i <= k; i++) dp[0][i] = maxn;
  for (int i = 1; i <= n; i++) {
    dp[i][0] = 0;
    for (int j = 1; j <= k; j++) {
      dp[i][j] = dp[i - 1][j];
      if (lseg[i] != -1) {
        dp[i][j] =
            min(dp[i][j],
                dp[segs[lseg[i]].first - 1][max(j - val[lseg[i]][i], 0)] + 1);
      }
    }
  }
  int ans = maxn;
  for (int i = 1; i <= n; i++) ans = min(ans, dp[i][k]);
  return (ans == maxn ? -1 : ans);
}
int main() {
  cin >> n >> s >> m >> k;
  vector<int> t;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    t.push_back(a[i]);
  }
  sort(t.begin(), t.end());
  t.resize(unique(t.begin(), t.end()) - t.begin());
  for (int i = 1; i <= n; i++)
    a[i] = lower_bound(t.begin(), t.end(), a[i]) - t.begin();
  memset(lseg, -1, sizeof lseg);
  for (int i = 0; i < s; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    segs.push_back(make_pair(l, r));
    for (int j = l; j <= r; j++) {
      if (lseg[j] == -1 || segs[lseg[j]].first > segs[i].first) {
        lseg[j] = i;
      }
    }
  }
  int ans = -1;
  int low = 0, high = n + 1;
  while (low < high) {
    int mid = (low + high) >> 1;
    int res = solve(mid);
    if (res == -1 || res > m) {
      low = mid + 1;
    } else {
      high = mid;
      ans = mid;
    }
  }
  if (ans == -1)
    cout << -1 << endl;
  else
    cout << t[ans] << endl;
  return 0;
}
