#include <bits/stdc++.h>
using namespace std;
const int N = 1505;
int n, s, m, k, a[N], num[N][N], opt[N], pref[N][N], dp[N][N];
pair<int, int> seg[N];
vector<int> val;
bool check(int mid) {
  int lim = val[mid];
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= n; j++) num[i][j] = num[i][j - 1] + (a[j] <= lim);
  }
  int res = 0;
  for (int i = 0; i <= s; i++) {
    for (int j = 0; j <= s; j++) {
      dp[i][j] = -1e9;
      pref[i][j] = -1e9;
    }
    pref[i][0] = 0;
  }
  for (int i = 1; i <= s; i++) {
    for (int j = 1; j <= min(i, m); j++) {
      int l = seg[i].second;
      int r = seg[i].first;
      dp[i][j] =
          max(dp[i][j], dp[opt[i]][j - 1] + num[seg[opt[i]].first + 1][r]);
      int id = lower_bound(seg + 1, seg + s + 1, make_pair(l, 0)) - seg - 1;
      dp[i][j] = max(dp[i][j], pref[id][j - 1] + num[l][r]);
      pref[i][j] = max(dp[i][j], pref[i - 1][j]);
      if (dp[i][j] >= k) return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    val.push_back(a[i]);
  }
  sort(val.begin(), val.end());
  val.erase(unique(val.begin(), val.end()), val.end());
  for (int i = 1; i <= s; i++) cin >> seg[i].second >> seg[i].first;
  sort(seg + 1, seg + s + 1);
  seg[0].second = 1e9;
  for (int i = 1; i <= s; i++) {
    for (int j = 1; j < i; j++) {
      if (seg[i].second <= seg[j].first && seg[j].first <= seg[i].first) {
        if (!opt[i] || seg[opt[i]].second > seg[j].second) opt[i] = j;
      }
    }
  }
  int l = 0, r = val.size() - 1, id = -1;
  while (l <= r) {
    int mid = (l + r) / 2;
    if (!check(mid))
      l = mid + 1;
    else {
      id = mid;
      r = mid - 1;
    }
  }
  if (id == -1) return cout << -1, 0;
  cout << val[id];
}
