#include <bits/stdc++.h>
using namespace std;
int a[1510], l[1510], r[1510];
pair<int, int> p[1510];
int n, m, k;
int v[1510];
int dp[1510][1510];
int c[1510];
inline void upd(int &w, int x) {
  if (w < x) w = x;
}
int can(int x) {
  if (!x) return 0;
  x = p[x - 1].first;
  for (int i = 0; i < n; i++) {
    c[i + 1] = c[i] + (a[i] <= x);
  }
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= m; j++) {
      dp[i][j] = -1001001001;
    }
  }
  dp[0][0] = 0;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= m; j++) {
      if (i < n) upd(dp[i + 1][j], dp[i][j]);
      if (j < m) upd(dp[v[i]][j + 1], dp[i][j] + c[v[i]] - c[i]);
    }
  }
  return dp[n][m] >= k;
}
int main() {
  int s;
  scanf("%d%d%d%d", &n, &s, &m, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    p[i] = make_pair(a[i], i);
  }
  for (int i = 0; i <= n; i++) {
    v[i] = i;
  }
  sort(p, p + n);
  for (int i = 0; i < s; i++) {
    scanf("%d%d", &l[i], &r[i]);
    --l[i];
    for (int j = l[i]; j < r[i]; j++) {
      if (v[j] < r[i]) v[j] = r[i];
    }
  }
  int lo = k - 1, hi = n;
  if (!can(hi)) {
    puts("-1");
    return 0;
  }
  while (lo + 1 < hi) {
    int mid = (lo + hi) / 2;
    if (can(mid)) {
      hi = mid;
    } else {
      lo = mid;
    }
  }
  printf("%d\n", p[hi - 1].first);
  return 0;
}
