#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxn = 2007;
int n, s, m, k;
int a[maxn], sum[maxn], dp[maxn][maxn], f[maxn][maxn];
pair<int, int> seg[maxn];
vector<pair<int, int> > sa;
bool ck(int val, int fuck) {
  for (int i = 1; i <= n; ++i) {
    sum[i] = (a[i] <= val);
  }
  for (int i = 1; i <= n; ++i) sum[i] += sum[i - 1];
  memset(dp, 0, sizeof(dp));
  memset(f, 0, sizeof(f));
  int k = 1;
  for (int i = 1; i <= sa.size(); ++i) {
    while (k < i && sa[i - 1].first > sa[k - 1].second) k++;
    for (int j = 1; j <= i; ++j) {
      dp[i][j] = max(
          dp[k][j - 1] + sum[sa[i - 1].second] - sum[sa[k - 1].second],
          f[k - 1][j - 1] + sum[sa[i - 1].second] - sum[sa[i - 1].first - 1]);
      f[i][j] = max(f[i - 1][j], dp[i][j]);
    }
  }
  int ret = 0;
  for (int i = 0; i <= m; ++i) {
    ret = max(ret, f[sa.size()][i]);
  }
  return (ret >= fuck);
}
int ms(int l, int r) {
  if (l == r) return l;
  int md = (l + r) >> 1;
  if (ck(md, k))
    return ms(l, md);
  else
    return ms(md + 1, r);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= (int)(n); ++i) cin >> a[i];
  for (int i = 1; i <= (int)(s); ++i) {
    cin >> seg[i].first >> seg[i].second;
    seg[i].second = -seg[i].second;
  }
  sort(seg + 1, seg + s + 1);
  for (int i = 1; i <= (int)(s); ++i) {
    bool fg = true;
    for (int j = 1; j < i; ++j) {
      if (seg[i].second >= seg[j].second) fg = false;
    }
    if (fg) sa.push_back({seg[i].first, -seg[i].second});
  }
  int ret = ms(1, 1e9 + 1);
  if (ret > 1e9) ret = -1;
  cout << ret << endl;
  return 0;
}
