#include <bits/stdc++.h>
using namespace std;
template <typename num_t>
inline void addmod(num_t& a, const long long& b, const int& m) {
  a = (a + b) % m;
  if (a < 0) a += m;
}
template <typename num_t>
inline void update_max(num_t& a, const num_t& b) {
  a = max(a, b);
}
template <typename num_t>
inline void update_min(num_t& a, const num_t& b) {
  a = min(a, b);
}
template <typename num_t>
num_t gcd(num_t lhs, num_t rhs) {
  return !lhs ? rhs : gcd(rhs % lhs, lhs);
}
const int inf = 1e9 + 7;
const long long ll_inf = 1ll * inf * inf;
const int MAX_N = 1500 + 1;
const int mod = inf;
int a[MAX_N];
vector<pair<int, int>> segment;
int f[MAX_N];
int n, s, k, m;
map<int, int> mapping;
int rev[MAX_N];
int sum[MAX_N];
int cnt = 0;
int dp[MAX_N][MAX_N];
bool check(int d) {
  for (int i = 1; i <= n; ++i) {
    sum[i] = sum[i - 1] + (a[i] <= d);
  }
  fill_n(dp[0], n + 1, inf);
  dp[0][0] = 0;
  for (int i = 1; i <= n; ++i) {
    int lhs = n + 1;
    for (int j = 0; j < s; ++j)
      if (segment[j].first <= i && i <= segment[j].second) {
        lhs = min(lhs, segment[j].first);
      }
    copy(dp[i - 1], dp[i - 1] + k + 1, dp[i]);
    if (lhs <= i && sum[i] - sum[lhs - 1] > 0) {
      int cnt = min(sum[i] - sum[lhs - 1], k);
      for (int t = cnt; t <= k; ++t)
        dp[i][t] = min(dp[i][t], dp[lhs - 1][t - cnt] + 1);
    }
  }
  return dp[n][k] <= m;
}
void solve() {
  cin >> n >> s >> m >> k;
  for (int i = (1), _b = (n + 1); i < _b; ++i) {
    cin >> a[i];
    mapping[a[i]] = 0;
  }
  for (auto& p : mapping) {
    p.second = ++cnt;
    rev[cnt] = p.first;
  }
  for (int i = 1; i <= n; ++i) {
    a[i] = mapping[a[i]];
  }
  for (int i = 0; i < s; ++i) {
    int u, v;
    cin >> u >> v;
    segment.push_back({u, v});
  }
  int lo = 1, hi = cnt, res = -1;
  while (lo <= hi) {
    int mid = (lo + hi) >> 1;
    if (check(mid)) {
      res = rev[mid];
      hi = mid - 1;
    } else
      lo = mid + 1;
  }
  cout << res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  const bool multiple_test = false;
  int test = 1;
  if (multiple_test) cin >> test;
  for (int i = 0; i < test; ++i) {
    solve();
  }
}
