#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int N = 1550;
int a[N], n, s, m, k;
set<int> all;
vector<int> usa;
vector<pii> segs;
int cless[N];
int W;
int was[N][N], dp[N][N];
int cby[N];
int foo(int pos, int m) {
  if (m == 0 || pos > n) return 0;
  int& res = dp[pos][m];
  if (was[pos][m] == W) return res;
  was[pos][m] = W;
  res = foo(pos + 1, m);
  if (cby[pos] == -1) return res;
  const auto& seg = segs[cby[pos]];
  return res = max(res, cless[seg.second] - cless[pos - 1] +
                            foo(seg.second + 1, m - 1));
}
bool can(int val) {
  for (int i = 1; i <= n; i++) {
    cless[i] = cless[i - 1];
    if (a[i] <= val) cless[i]++;
  }
  W++;
  return foo(1, m) >= k;
}
void solve() {
  sort(segs.begin(), segs.end(), [](const pii& p1, const pii& p2) {
    if (p1.first == p2.first) return p1.second > p2.second;
    return p1.first < p2.first;
  });
  int rmax = 0, wi = 0;
  for (int ri = 0; ri < segs.size(); ri++) {
    if (segs[ri].second <= rmax) continue;
    segs[wi++] = segs[ri];
    rmax = segs[ri].second;
  }
  segs.resize(wi);
  memset(cby, 0xff, sizeof(cby));
  for (int i = 0; i < segs.size(); i++) {
    int spos = segs[i].first;
    int epos = segs[i].second;
    if (i + 1 < segs.size()) epos = min(epos, segs[i + 1].first - 1);
    for (int j = spos; j <= epos; j++) cby[j] = i;
  }
  for (int x : all) usa.push_back(x);
  int L = 0;
  int R = usa.size();
  while (L < R) {
    int mid = (L + R) / 2;
    if (can(usa[mid]))
      R = mid;
    else
      L = mid + 1;
  }
  if (L < usa.size())
    cout << usa[L];
  else
    cout << -1;
  cout << endl;
}
void load() {
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    all.insert(a[i]);
  }
  for (int i = 1; i <= s; i++) {
    int l, r;
    cin >> l >> r;
    segs.push_back({l, r});
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  load();
  solve();
  return 0;
}
