#include <bits/stdc++.h>
using namespace std;
const int N = 1510;
vector<int> grp[N];
int a[N], cum[N];
int jump[N];
int dp[N][N];
int n, s, m, K;
int solve(int pos, int taken) {
  if (taken > m) return -1e9;
  if (pos > n) return 0;
  if (dp[pos][taken] != -1) return dp[pos][taken];
  int ans = solve(pos + 1, taken);
  if (jump[pos]) {
    int l = pos, r = jump[pos];
    ans = max(ans, cum[r] - cum[l - 1] + solve(r + 1, taken + 1));
  }
  return dp[pos][taken] = ans;
}
int F(int lim) {
  for (int i = 1; i <= n; i++) {
    cum[i] = cum[i - 1] + (a[i] <= lim);
  }
  memset(dp, -1, sizeof dp);
  return solve(1, 0);
}
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++) {
    int l, r;
    cin >> l >> r;
    for (int j = l; j <= r; j++) {
      jump[j] = max(jump[j], r);
    }
  }
  int lo = 1, hi = 1e9;
  while (hi > lo) {
    int mid = lo + hi >> 1;
    int cnt = F(mid);
    if (cnt >= K)
      hi = mid;
    else
      lo = mid + 1;
  }
  if (F(lo) >= K)
    cout << lo << endl;
  else
    cout << "-1" << endl;
  return 0;
}
