#include <bits/stdc++.h>
using namespace std;
const int maxn = 1505;
int dp[maxn][maxn], a[maxn], n, m, k, s, b[maxn];
int jump[maxn];
bool chk(int mid) {
  memset(dp, 0, sizeof dp);
  for (int i = 1; i <= n; ++i) b[i] = b[i - 1] + (a[i] <= mid);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) {
      if (jump[i])
        dp[i][j] =
            max(dp[i - 1][j], dp[jump[i] - 1][j - 1] + b[i] - b[jump[i] - 1]);
      dp[i][j] = max(dp[i][j], dp[i][j - 1]);
      dp[i][j] = max(dp[i][j], dp[i - 1][j]);
    }
  return dp[n][m] >= k;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if (fopen("TEST"
            ".INP",
            "r"))
    freopen(
        "TEST"
        ".INP",
        "r", stdin),
        freopen(
            "TEST"
            ".OUT",
            "w", stdout);
  cin >> n >> s >> m >> k;
  vector<int> v;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    v.push_back(a[i]);
  }
  for (int i = 1; i <= s; ++i) {
    int l, r;
    cin >> l >> r;
    if (jump[r] == 0)
      jump[r] = l;
    else
      jump[r] = min(jump[r], l);
  }
  for (int i = n; i >= 1; --i) {
    if (jump[i + 1] != 0)
      if (jump[i] == 0)
        jump[i] = jump[i + 1];
      else
        jump[i] = min(jump[i], jump[i + 1]);
  }
  sort(v.begin(), v.end());
  int l = 0, h = n - 1;
  while (l <= h) {
    int mid = l + h >> 1;
    if (chk(v[mid]))
      h = mid - 1;
    else
      l = mid + 1;
  }
  if (l >= n)
    cout << -1;
  else
    cout << v[l];
}
