#include <bits/stdc++.h>
using namespace std;
int n, m, s, k, ans, f[1510][1510], b[1510], a[1510], mx[1510];
int pd(int mid) {
  int i, j;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) f[i][j] = 0;
  for (i = 1; i <= n; i++) b[i] = b[i - 1] + (a[i] <= mid ? 1 : 0);
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      f[i][j] = max(f[i][j], f[i - 1][j]);
      f[mx[i]][j] = max(f[mx[i]][j], f[i - 1][j - 1] + b[mx[i]] - b[i - 1]);
    }
  }
  return f[n][m] >= k;
}
int main() {
  int i, j, l, r, mid;
  scanf("%d%d%d%d", &n, &s, &m, &k);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 1; i <= s; i++) {
    scanf("%d%d", &l, &r);
    for (j = l; j <= r; j++) mx[j] = max(mx[j], r);
  }
  l = 0;
  r = 1e9;
  ans = r;
  while (l <= r) {
    mid = (l + r) / 2;
    if (pd(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  if (pd(ans))
    printf("%d", ans);
  else
    puts("-1");
}
