#include <bits/stdc++.h>
using namespace std;
int a[1505], sum[1505];
int dp[1505][1505];
int nt[1505];
int main() {
  int n, s, m, k;
  scanf("%d%d%d%d", &n, &s, &m, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    nt[i] = -1;
  }
  for (int i = 1; i <= s; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    l--;
    for (int j = l; j < r; j++) {
      nt[j] = max(nt[j], r);
    }
  }
  int lo = 1, hi = 1e9, ans = -1;
  while (lo <= hi) {
    int mid = (lo + hi) / 2;
    memset(dp, -1, sizeof(dp));
    for (int i = 1; i <= n; i++) {
      if (a[i] <= mid)
        sum[i] = 1;
      else
        sum[i] = 0;
      sum[i] += sum[i - 1];
    }
    dp[0][0] = 0;
    for (int i = 0; i <= n; i++) {
      for (int j = 0; j <= s; j++) {
        dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
        if (j < s) {
          dp[nt[i]][j + 1] =
              max(dp[nt[i]][j + 1], dp[i][j] + sum[nt[i]] - sum[i]);
        }
      }
    }
    int res = 0;
    for (int j = 0; j <= m; j++) res = max(res, dp[n][j]);
    if (res >= k)
      ans = mid, hi = mid - 1;
    else
      lo = mid + 1;
  }
  printf("%d\n", ans);
}
