#include <bits/stdc++.h>
using namespace std;
const int DN = 1505;
int n, s, m, k, a[DN], sum[DN];
int b[DN], st, dr, mij, f, g;
int dp[DN][DN];
int vf(int val) {
  int st, l, f, mi;
  for (int i = 1; i <= n; i++) {
    sum[i] = sum[i - 1];
    if (a[i] <= val) sum[i]++;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= m; j++) dp[i][j] = dp[i - 1][j];
    if (b[i] == 1e9) continue;
    st = b[i] - 1;
    l = i - st;
    f = sum[i] - sum[st];
    for (int j = 0; j < m; j++) {
      dp[i][j + 1] = max(dp[i][j + 1], dp[st][j] + f);
      if (dp[i][j + 1] >= k) return 1;
    }
    st = 0;
    mi = 1e9;
    for (int j = b[i]; j < i; j++)
      if (b[j] < mi) {
        mi = b[j];
        st = j;
      }
    if (mi == 1e9 || mi >= b[i]) continue;
    f = sum[i] - sum[st];
    for (int j = 0; j < m; j++) {
      dp[i][j + 1] = max(dp[i][j + 1], dp[st][j] + f);
      if (dp[i][j + 1] >= k) return 1;
    }
  }
  return 0;
}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = 1e9;
  }
  for (int i = 1; i <= s; i++) {
    cin >> f >> g;
    b[g] = min(b[g], f);
  }
  st = 1;
  dr = 1e9;
  while (st < dr) {
    mij = (st + dr) / 2;
    if (vf(mij))
      dr = mij;
    else
      st = mij + 1;
  }
  if (vf(st))
    cout << st;
  else
    cout << -1;
}
