#include <bits/stdc++.h>
using namespace std;
const int N = 1500 + 10;
const int INF = 0x3f3f3f3f;
int n, s, m, k;
int a[N], b[N], f[N][N], mn[N];
struct dat {
  int l, r;
  bool operator<(const dat& rhs) const { return l < rhs.l; }
} q[N];
bool flag[N];
int mx[N];
void update(int x, int v) {
  for (; x <= n; x += x & -x) mx[x] = max(mx[x], v);
}
int query(int x) {
  int res = 0;
  for (; x; x -= x & -x) res = max(res, mx[x]);
  return res;
}
bool check(int mid) {
  for (int i = 1; i <= n; i++)
    if (a[i] <= mid)
      b[i] = 1;
    else
      b[i] = 0;
  int Max = 0;
  for (int i = 1; i <= n; i++) b[i] += b[i - 1];
  memset(f, 0, sizeof(f));
  for (int i = 1; i <= m; i++) {
    memset(mx, 0, sizeof(mx));
    for (int j = 1; j <= s; j++) {
      f[i][j] = f[i - 1][j];
      int t = mn[q[j].l];
      f[i][j] = max(f[i][j], f[i - 1][t] + b[q[j].r] - b[q[t].r]);
      f[i][j] = max(f[i][j], query(q[j].l - 1) + b[q[j].r] - b[q[j].l - 1]);
      update(q[j].r, f[i - 1][j]);
      Max = max(Max, f[i][j]);
    }
  }
  return Max >= k;
}
int main() {
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= s; i++) scanf("%d%d", &q[i].l, &q[i].r);
  for (int i = 1; i <= s; i++)
    for (int j = 1; j <= s; j++)
      if (i != j && !flag[j] && q[j].l <= q[i].l && q[i].r <= q[j].r) {
        flag[i] = 1;
        break;
      }
  int tp = 0;
  for (int i = 1; i <= s; i++)
    if (!flag[i]) q[++tp].l = q[i].l, q[tp].r = q[i].r;
  s = tp;
  sort(q + 1, q + s + 1);
  for (int i = 1; i <= s; i++)
    for (int j = q[i].l; j <= q[i].r; j++)
      if (!mn[j] || q[mn[j]].l > q[i].l) mn[j] = i;
  int L = -INF, R = INF;
  while (L < R) {
    int mid = L + R >> 1;
    if (check(mid))
      R = mid;
    else
      L = mid + 1;
  }
  if (check(L))
    cout << L;
  else
    cout << -1;
  return 0;
}
