#include <bits/stdc++.h>
using namespace std;
const long long N = 1505;
int dp[N][N], n, m, s, k, a[N], l[N], r[N], nxt[N], sum[N];
bool check(int x) {
  for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + (a[i] <= x);
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      dp[i][j] = dp[i - 1][j];
      if (nxt[i] != 1e9) {
        dp[i][j] =
            max(dp[i][j], dp[nxt[i] - 1][j - 1] + (sum[i] - sum[nxt[i] - 1]));
      }
      ans = max(ans, dp[i][j]);
    }
  }
  return (ans >= k);
}
int main() {
  scanf("%d%d%d%d", &n, &s, &m, &k);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    nxt[i] = 1e9;
  }
  for (int i = 1; i <= s; i++) cin >> l[i] >> r[i];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= s; j++) {
      if (l[j] <= i and r[j] >= i) nxt[i] = min(nxt[i], l[j]);
    }
  }
  int l = 0, r = 1e9;
  if (!check(r)) return cout << -1, 0;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  cout << r;
}
