#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3, inf = 1e9;
int n, s, m, k, aa[maxn], dp[maxn][maxn], cnt[maxn], sl[maxn], a[maxn];
vector<pair<int, int>> apear[maxn];
void input() {
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> aa[i];
    a[i] = aa[i];
  }
  a[n + 1] = aa[n + 1] = inf;
  sort(a + 1, a + n + 1);
  for (int i = 1, r; i <= s; i++) {
    cin >> sl[i] >> r;
    for (int j = sl[i]; j <= r; j++) apear[j].push_back({sl[i], i});
  }
  for (int i = 1; i <= n; i++) sort(apear[i].begin(), apear[i].end());
}
void clear() {
  for (int i = 0; i <= n; i++) memset(dp[i], 0, sizeof dp[i]);
  memset(cnt, 0, sizeof cnt);
}
bool check(int x) {
  clear();
  for (int i = 1; i <= n; i++) {
    if (aa[i] <= x)
      for (auto [j, j2] : apear[i]) cnt[j2]++;
    for (int j = 1; j <= m; j++)
      dp[i][j] = max(
          max(dp[i][j - 1], dp[i - 1][j]),
          (apear[i].size()
               ? cnt[apear[i][0].second] + dp[sl[apear[i][0].second] - 1][j - 1]
               : 0));
  }
  return dp[n][m] >= k;
}
void bs() {
  int l = 0, r = n + 1;
  while (l < r) {
    int mid = (l + r) / 2;
    check(a[mid]) ? r = mid : l = mid + 1;
  }
  cout << (r <= n ? a[r] : -1) << endl;
}
int main() {
  input();
  bs();
  return 0;
}
