#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 200;
const int mod = 1e9 + 7;
int n, m, s, k, a[N];
int l[N], r[N];
int sum[N];
vector<int> g[1505];
int dp[1505][1505];
vector<pair<int, int> > f[1505];
inline int check(int x) {
  for (int i = 1; i <= n; ++i) sum[i] = sum[i - 1] + (a[i] <= x);
  for (int r = 0; r <= n; ++r)
    for (int j = 0; j <= s; ++j) dp[r][j] = -1e9;
  dp[0][0] = 0;
  for (int i = 0; i <= s; ++i) f[i].clear(), f[i].push_back({0, 0});
  for (int r = 1; r <= n; ++r) {
    int L = r + 1;
    for (int l : g[r]) L = min(L, l);
    for (int j = 0; j <= s; ++j) {
      dp[r][j] = max(dp[r][j], dp[r - 1][j]);
      if (j + 1 <= s && L <= r) {
        int le = -1, ri = int(f[j].size()) - 1;
        while (le + 1 < ri) {
          int mi = le + ri >> 1;
          if (f[j][mi].second >= L - 1)
            ri = mi;
          else
            le = mi;
        }
        dp[r][j + 1] = max(dp[r][j + 1], f[j][ri].first + sum[r]);
      }
    }
    for (int j = 0; j <= s; ++j) {
      int val = dp[r][j] - sum[r];
      while (f[j].size() && f[j].back().first <= val) f[j].pop_back();
      f[j].push_back({val, r});
    }
  }
  int ans = 0;
  for (int i = 0; i <= m; ++i) ans = max(ans, dp[n][i]);
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= s; ++i) {
    cin >> l[i] >> r[i];
    int fail = 0;
    for (int j = 1; j < i; ++j)
      if (l[j] <= l[i] && r[i] <= r[j]) fail = 1;
    if (!fail) {
      g[r[i]].push_back(l[i]);
    } else
      --s, --i;
  }
  vector<int> all;
  ;
  for (int i = 1; i <= n; ++i) all.push_back(a[i]);
  sort(all.begin(), all.end());
  all.resize(unique(all.begin(), all.end()) - all.begin());
  int le = -1, ri = int(all.size());
  while (le + 1 < ri) {
    int mi = le + ri >> 1;
    if (check(all[mi]) >= k)
      ri = mi;
    else
      le = mi;
  }
  if (ri == all.size()) return cout << -1, 0;
  cout << all[ri];
  return 0;
}
