#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
void doRoutine() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  srand(322179);
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> p) {
  out << "{" << p.first << ", " << p.second << "}";
  return out;
}
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> arr) {
  for (int64_t i = 0; i < arr.size(); ++i) out << arr[i] << " ";
  out << endl;
  return out;
}
template <typename T>
istream& operator>>(istream& in, vector<T>& arr) {
  for (int64_t i = 0; i < arr.size(); ++i) in >> arr[i];
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, multiset<T> a) {
  out << "{";
  for (auto x : a) {
    out << x << " ";
  }
  out << "}";
  return out;
}
signed main() {
  doRoutine();
  int64_t n, s, m, k;
  cin >> n >> s >> m >> k;
  vector<int64_t> arr(n);
  cin >> arr;
  vector<pair<int64_t, int64_t> > pos(n);
  for (int64_t i = 0; i < n; ++i) {
    pos[i] = make_pair(arr[i], i);
  }
  sort(pos.begin(), pos.end());
  vector<pair<int64_t, int64_t> > ot(s);
  cin >> ot;
  sort(ot.begin(), ot.end());
  for (auto& x : ot) x.first--;
  int64_t l = -1, r = n;
  while (r - l > 1) {
    int64_t t = (r + l) / 2;
    vector<bool> used(n);
    vector<int64_t> pref(n + 1);
    for (int64_t i = 0; i <= t; ++i) {
      used[pos[i].second] = true;
    }
    for (int64_t i = 0; i < n; ++i) {
      pref[i + 1] = pref[i] + used[i];
    }
    vector<vector<int64_t> > dp(m + 1, vector<int64_t>(n + 1));
    for (int64_t i = 1; i <= m; ++i) {
      for (auto x : ot)
        dp[i][x.second] =
            max(dp[i][x.second],
                dp[i - 1][x.first] + pref[x.second] - pref[x.first]);
      for (int64_t j = n - 1; j >= 0; --j) {
        dp[i][j] = max(dp[i][j], dp[i][j + 1] - used[j]);
      }
      for (int64_t j = 1; j <= n; ++j) {
        dp[i][j] = max(dp[i][j], dp[i][j - 1]);
      }
    }
    int64_t mx = 0;
    for (auto x : dp[m]) mx = max(mx, x);
    if (mx >= k) {
      r = t;
    } else {
      l = t;
    }
  }
  if (r == n) {
    cout << -1 << endl;
  } else {
    cout << pos[r].first << endl;
  }
  return 0;
}
