#include <bits/stdc++.h>
using namespace std;
using LL = long long;
template <class T>
int size(T &&x) {
  return int(x.size());
}
template <class A, class B>
ostream &operator<<(ostream &out, const pair<A, B> &p) {
  return out << '(' << p.first << ", " << p.second << ')';
}
template <class T>
auto operator<<(ostream &out, T &&x) -> decltype(x.begin(), out) {
  out << '{';
  for (auto it = x.begin(); it != x.end(); ++it)
    out << *it << (it == prev(x.end()) ? "" : ", ");
  return out << '}';
}
void dump() {}
template <class T, class... Args>
void dump(T &&x, Args... args) {
  cerr << x << ";  ";
  dump(args...);
}
mt19937_64 rng(0);
int rd(int l, int r) { return uniform_int_distribution<int>(l, r)(rng); }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, s, m, k;
  cin >> n >> s >> m >> k;
  vector<int> a(n);
  for (int &ai : a) cin >> ai;
  0 && cerr;
  vector<int> unique_a = a;
  sort(unique_a.begin(), unique_a.end());
  unique_a.erase(unique(unique_a.begin(), unique_a.end()), unique_a.end());
  0 && cerr;
  vector<pair<int, int>> intervals;
  for (int i = (0); i <= ((s)-1); ++i) {
    int l, r;
    cin >> l >> r;
    --l, --r;
    intervals.emplace_back(l, r);
  }
  sort(intervals.begin(), intervals.end(),
       [&](pair<int, int> x, pair<int, int> y) {
         if (x.second != y.second) return x.second < y.second;
         return x.first < y.first;
       });
  0 && cerr;
  auto is_leq = [&](int x) {
    vector<bool> new_a(n);
    for (int i = (0); i <= ((n)-1); ++i) new_a[i] = bool(a[i] <= x);
    0 && cerr;
    vector<int> pref(n);
    for (int i = (0); i <= ((n)-1); ++i) {
      pref[i] = new_a[i];
      if (i > 0) pref[i] += pref[i - 1];
    }
    auto cnt = [&](int l, int r) {
      return pref[r] - (l == 0 ? 0 : pref[l - 1]);
    };
    vector<vector<int>> dp(s, vector<int>(m + 1)), pref_i_mx_dp = dp;
    for (int i = (0); i <= ((s)-1); ++i) {
      int furthest_left = -1;
      for (int j = (0); j <= ((i)-1); ++j)
        if (intervals[i].first <= intervals[j].second)
          if (furthest_left == -1 or
              intervals[j].first <= intervals[furthest_left].first)
            furthest_left = j;
      int last_noninter = -1;
      for (int j = (0); j <= ((i)-1); ++j)
        if (intervals[j].second < intervals[i].first) last_noninter = j;
      0 && cerr;
      for (int curr_m = (1); curr_m <= (m); ++curr_m) {
        dp[i][curr_m] = max(dp[i][curr_m - 1],
                            cnt(intervals[i].first, intervals[i].second));
        if (furthest_left != -1)
          dp[i][curr_m] =
              max(dp[i][curr_m], dp[furthest_left][curr_m - 1] +
                                     cnt(intervals[furthest_left].second + 1,
                                         intervals[i].second));
        if (last_noninter != -1)
          dp[i][curr_m] = max(dp[i][curr_m],
                              pref_i_mx_dp[last_noninter][curr_m - 1] +
                                  cnt(intervals[i].first, intervals[i].second));
        pref_i_mx_dp[i][curr_m] =
            max((i == 0 ? 0 : pref_i_mx_dp[i - 1][curr_m]), dp[i][curr_m]);
      }
    }
    0 && cerr;
    int mx = 0;
    for (int i = (0); i <= ((s)-1); ++i)
      for (int curr_m = (1); curr_m <= (m); ++curr_m)
        mx = max(mx, dp[i][curr_m]);
    return mx >= k;
  };
  int l = 0, r = size(unique_a);
  while (l != r) {
    int m = (l + r) / 2;
    if (is_leq(unique_a[m]))
      r = m;
    else
      l = m + 1;
  }
  int answer = (l == size(unique_a) ? -1 : unique_a[l]);
  cout << answer << '\n';
}
