#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXA = 1500;
const int MAXSEG = 1500;
int na, nseg, nchoose, wantorder;
int a[MAXA];
int l[MAXSEG], r[MAXSEG];
int nxt[MAXA];
int sum[MAXA + 1];
int dp[MAXSEG + 1][MAXA + 1];
void upd(int &a, int b) { a = max(a, b); }
bool can(int x) {
  sum[0] = 0;
  for (int i = (0); i < (na); ++i) sum[i + 1] = sum[i] + (a[i] <= x ? 1 : 0);
  for (int i = (0); i <= (nchoose); ++i)
    for (int j = (0); j <= (na); ++j) dp[i][j] = 0;
  for (int i = (0); i <= (nchoose); ++i)
    for (int j = (0); j < (na); ++j) {
      upd(dp[i][j + 1], dp[i][j]);
      if (i + 1 <= nchoose && nxt[j] != -1)
        upd(dp[i + 1][nxt[j]], dp[i][j] + sum[nxt[j]] - sum[j]);
    }
  for (int i = (0); i <= (nchoose); ++i)
    if (dp[i][na] >= wantorder) return true;
  return false;
}
int val[MAXA], nval;
int solve() {
  for (int j = (0); j < (na); ++j) nxt[j] = -1;
  for (int i = (0); i < (nseg); ++i)
    for (int j = (l[i]); j <= (r[i]); ++j) nxt[j] = max(nxt[j], r[i] + 1);
  nval = 0;
  for (int i = (0); i < (na); ++i) val[nval++] = a[i];
  sort(val, val + nval);
  nval = unique(val, val + nval) - val;
  int l = -1, h = nval;
  while (l + 1 < h) {
    int m = l + (h - l) / 2;
    if (can(val[m]))
      h = m;
    else
      l = m;
  }
  return h == nval ? -1 : val[h];
}
void run() {
  scanf("%d%d%d%d", &na, &nseg, &nchoose, &wantorder);
  for (int i = (0); i < (na); ++i) scanf("%d", &a[i]);
  for (int i = (0); i < (nseg); ++i)
    scanf("%d%d", &l[i], &r[i]), --l[i], --r[i];
  printf("%d\n", solve());
}
int main() {
  run();
  return 0;
}
