#include <bits/stdc++.h>
using namespace std;
const int N = 1500 + 5, mod = 998244353;
int n, s, m, k, R[N], a[N], b[N], f[N], dp[N][N];
int solve(int idx, int w) {
  if (w > m) return -1e9;
  if (idx > n) return 0;
  int &ret = dp[idx][w];
  if (~ret) return ret;
  ret = solve(idx + 1, w);
  if (b[idx]) ret = max(ret, solve(b[idx] + 1, w + 1) + f[b[idx]] - f[idx - 1]);
  return ret;
}
bool ch(int l) {
  memset(f, 0, sizeof f);
  for (int i = 1; i <= n; i++) {
    f[i] = f[i - 1];
    if (a[i] <= l) f[i]++;
  }
  memset(dp, -1, sizeof dp);
  return (solve(1, 0) >= k);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> s >> m >> k;
  int z = 0;
  map<int, int> mp;
  for (int i = 1; i <= n; i++) cin >> a[i], mp[a[i]];
  for (auto &it : mp) {
    it.second = ++z;
    R[z] = it.first;
  }
  for (int i = 1; i <= n; i++) a[i] = mp[a[i]];
  for (int i = 1; i <= s; i++) {
    int l, r;
    cin >> l >> r;
    b[l] = max(b[l], r);
  }
  for (int i = 1; i <= n; i++) {
    if (b[i - 1] >= i) b[i] = max(b[i - 1], b[i]);
  }
  int lo = 1, hi = z, md;
  while (lo < hi) {
    md = lo + (hi - lo) / 2;
    if (ch(md))
      hi = md;
    else
      lo = md + 1;
  }
  if (ch(lo))
    cout << R[lo];
  else
    cout << -1;
  return 0;
}
