#include <bits/stdc++.h>
using namespace std;
const int MAX = 1600;
const int oo = 1E9;
int n, s, m, k;
int go[MAX];
int in[MAX];
int st[MAX], st_sum[MAX];
void InitStripe(int up) {
  for (int i = 0; i < n; ++i)
    if (in[i] <= up)
      st[i] = 1;
    else
      st[i] = 0;
  st_sum[0] = 0;
  for (int i = 1; i <= n; ++i) st_sum[i] = st_sum[i - 1] + st[i - 1];
}
int dp[MAX][MAX];
int MaxStripe() {
  for (int i = 0; i <= m; ++i) dp[0][i] = 0;
  for (int t = 1; t <= n; ++t) {
    dp[t][0] = dp[t - 1][0];
    for (int use = 1; use <= m; ++use) {
      dp[t][use] = dp[t - 1][use];
      int a = go[t - 1];
      if (a < oo) {
        (dp[t][use]) =
            max((dp[t][use]), (dp[a][use - 1] + st_sum[t] - st_sum[a]));
      }
    }
  }
  return dp[n][m];
}
bool Ok(int val) {
  InitStripe(val);
  return MaxStripe() >= k;
}
int main() {
  scanf("%d%d%d%d", &n, &s, &m, &k);
  fill(go, go + n, oo);
  for (int i = 0; i < n; ++i) scanf("%d", &in[i]);
  for (int i = 0; i < s; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    --x, --y;
    for (int j = x; j <= y; ++j) (go[j]) = min((go[j]), (x));
  }
  vector<int> vals(in, in + n);
  sort(vals.begin(), vals.end());
  vals.erase(unique(vals.begin(), vals.end()), vals.end());
  if (!Ok(vals.back())) {
    printf("-1\n");
  } else {
    int lo = 0, hi = ((int)(vals).size()) - 1, mid;
    for (;;) {
      if (lo + 1 >= hi) {
        if (Ok(vals[lo]))
          mid = lo;
        else
          mid = hi;
        break;
      }
      mid = (lo + hi) >> 1;
      if (Ok(vals[mid]))
        hi = mid;
      else
        lo = mid;
    }
    printf("%d\n", vals[mid]);
  }
  return 0;
}
