#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 554;
const int inf = 1e9 + 7;
int sum[N];
int a[N];
int n, m, s, k;
int dp[N][N], pre[N];
int ll, rr;
bool judge(int mid) {
  for (int i = 1; i <= n; ++i) {
    sum[i] = sum[i - 1] + (a[i] <= mid);
    for (int j = 1; j <= m; ++j) {
      dp[i][j] = max(dp[i - 1][j], dp[pre[i]][j - 1] + sum[i] - sum[pre[i]]);
    }
  }
  return dp[n][m] >= k;
}
int bish(int l, int r) {
  int mid;
  int ans = -1;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (judge(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  return ans;
}
int main() {
  scanf("%d%d%d%d", &n, &s, &m, &k);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]), pre[i] = i;
  for (int i = 1; i <= s; ++i) {
    scanf("%d%d", &ll, &rr);
    for (int j = ll; j <= rr; ++j) pre[j] = min(pre[j], ll - 1);
  }
  int ans = bish(1, inf);
  printf("%d\n", (ans >= 1e9 + 1) ? -1 : ans);
  return 0;
}
