#include <bits/stdc++.h>
using namespace std;
const long long base = 31;
const long long md = 1e9 + 7;
long long n, s, m, k;
long long dp1[1600][1600], dp2[1600][1600], pref[1600], a[1600], mx[1600];
pair<long long, long long> x[1600];
bool check(long long u) {
  for (long long i = 1; i <= n; i++) pref[i] = (a[i] <= u);
  for (long long i = 1; i <= n; i++) pref[i] += pref[i - 1];
  for (long long i = 0; i < 1600; i++)
    for (long long j = 0; j < 1600; j++) {
      dp1[i][j] = 0;
      dp2[i][j] = -1e18;
    }
  long long ans = 0;
  for (long long cnt = 1; cnt <= m; cnt++) {
    for (long long last = 1; last <= n; last++) {
      dp1[last][cnt] =
          dp1[last - mx[last]][cnt - 1] + pref[last] - pref[last - mx[last]];
      dp1[last][cnt] = max(dp1[last][cnt], dp1[last - 1][cnt]);
      ans = max(ans, dp1[last][cnt]);
    }
  }
  return ans >= k;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s >> m >> k;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= s; i++) {
    cin >> x[i].first >> x[i].second;
    mx[x[i].second] = max(mx[x[i].second], x[i].second - x[i].first + 1);
  }
  for (long long i = n; i >= 1; i--) mx[i] = max(mx[i], mx[i + 1] - 1);
  sort(x + 1, x + 1 + s);
  long long l = 1;
  long long r = 1e9;
  while (r - l > 1) {
    long long d = (l + r) / 2;
    if (check(d))
      r = d;
    else
      l = d;
  }
  if (check(l))
    cout << l;
  else if (check(r))
    cout << r;
  else
    cout << -1;
}
