#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int MAXN = 1555;
int n, s, m, k;
int a[MAXN], l[MAXN], r[MAXN];
int ss[MAXN], mx[MAXN];
int dp[MAXN][MAXN];
bool ok(int x) {
  for (int i = 1; i <= n; i++) {
    ss[i] = ss[i - 1];
    if (a[i] <= x) {
      ss[i]++;
    }
  }
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= m; j++) {
      dp[i][j] = 0;
    }
  }
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= m; j++) {
      dp[i + 1][j] = max(dp[i + 1][j], dp[i][j]);
      if (mx[i + 1] != 0)
        dp[mx[i + 1]][j + 1] =
            max(dp[mx[i + 1]][j + 1], dp[i][j] + ss[mx[i + 1]] - ss[i]);
    }
  }
  int ans = 0;
  for (int i = 0; i <= m; i++) {
    ans = max(ans, dp[n][i]);
  }
  return ans >= k;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= s; i++) {
    cin >> l[i] >> r[i];
    for (int j = l[i]; j <= r[i]; j++) {
      mx[j] = max(mx[j], r[i]);
    }
  }
  int L = 1, R = 1e9;
  while (L < R) {
    int M = (L + R) / 2;
    if (ok(M)) {
      R = M;
    } else {
      L = M + 1;
    }
  }
  cout << (ok(L) ? L : -1);
}
