#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& out, vector<T> v) {
  for (T t : v) out << t << ' ';
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, set<T> v) {
  for (T t : v) out << t << ' ';
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, pair<T, T> v) {
  out << v.first << ' ' << v.second;
  return out;
}
int a[1500 + 3], X[1500 + 3], Y[1500 + 3];
int dp[1500 + 3][1500 + 3];
int small[1500];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, s, m, k;
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= s; ++i) cin >> X[i] >> Y[i];
  for (int i = 1; i <= n; ++i) {
    small[i] = n + 1;
    for (int j = 1; j <= s; ++j) {
      if (X[j] <= i && Y[j] >= i) small[i] = min(X[j], small[i]);
    }
  }
  vector<int> b(n + 1), pre(n + 1);
  function<bool(int)> cal = [&](int val) {
    b.assign(n + 1, 0);
    pre.assign(n + 1, 0);
    for (int i = 1; i <= n; ++i) {
      if (a[i] <= val) b[i] = 1;
      pre[i] = pre[i - 1] + b[i];
    }
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= s; ++j) dp[i][j] = 0;
    }
    for (int i = 1; i <= n; ++i) {
      for (int j = 1; j <= s; ++j) {
        if (small[i] < n + 1)
          dp[i][j] = max(dp[small[i] - 1][j - 1] + pre[i] - pre[small[i] - 1],
                         dp[i - 1][j]);
        else
          dp[i][j] = dp[i - 1][j];
        if (j <= m && dp[i][j] >= k) return true;
      }
    }
    return false;
  };
  int l = 1, r = 1000000001;
  int ans = -1;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (cal(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  cout << ans;
  return 0;
}
