#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1505;
int a[MAXN], dp[MAXN][MAXN], n, s, m, k, pre[MAXN], add[MAXN];
vector<int> v[MAXN];
vector<int> unq;
bool ok(int x) {
  memset(pre, 0, sizeof pre);
  memset(dp, 0, sizeof dp);
  for (int i = 1; i <= n; ++i) {
    if (a[i] <= x) ++pre[i];
    pre[i] += pre[i - 1];
  }
  for (int i = n; i >= 1; --i) {
    for (int j = m; j >= 0; --j) {
      dp[i][j] = dp[i][j + 1];
      if (j < m)
        dp[i][j] =
            max(dp[i + 1][j], dp[add[i] + 1][j + 1] + pre[add[i]] - pre[i - 1]);
      else
        dp[i][j] = max(dp[i][j], dp[i + 1][j]);
    }
  }
  return dp[1][0] >= k;
}
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];
    unq.push_back(a[i]);
  }
  sort(unq.begin(), unq.end());
  for (int i = 0; i < s; ++i) {
    int l, r;
    cin >> l >> r;
    v[l].push_back(r);
  }
  for (int i = 1; i <= n; ++i) {
    add[i] = add[i - 1];
    for (int j = 0; j < v[i].size(); ++j) add[i] = max(add[i], v[i][j]);
  }
  int l = 0, r = unq.size() - 1, ans = -1;
  while (l <= r) {
    int md = (l + r) / 2;
    if (ok(unq[md])) {
      ans = md;
      r = md - 1;
    } else
      l = md + 1;
  }
  if (ans != -1)
    cout << unq[ans] << '\n';
  else
    cout << -1 << '\n';
}
