#include <bits/stdc++.h>
using namespace std;
const int N = 1500 + 22;
int n, m, s, k;
int l[N], r[N], a[N], lf[N], dp[N][N];
int b[N], sb[N];
bool ck(int val) {
  memset(b, 0, sizeof(b));
  memset(sb, 0, sizeof(sb));
  memset(dp, 0, sizeof(dp));
  for (int i = 1; i <= n; i++) b[i] = (a[i] <= val), sb[i] = sb[i - 1] + b[i];
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= s; j++) dp[i][j] = dp[i - 1][j];
    if (lf[i] == N) continue;
    for (int j = 1; j <= s; j++)
      dp[i][j] = max(dp[i][j], dp[lf[i] - 1][j - 1] + sb[i] - sb[lf[i] - 1]);
  }
  return dp[n][m] >= k;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  vector<int> vec;
  memset(lf, 63, sizeof(lf));
  cin >> n >> s >> m >> k;
  for (int i = 1; i <= n; i++) cin >> a[i], vec.push_back(a[i]);
  for (int i = 0; i < N; i++) lf[i] = N;
  for (int i = 0; i < (s); i++)
    cin >> l[i] >> r[i], lf[r[i]] = min(lf[r[i]], l[i]);
  for (int i = n; i >= 1; i--) {
    if (lf[i] == N) continue;
    for (int j = i; j >= lf[i]; j--) lf[j] = min(lf[j], lf[i]);
  }
  sort(vec.begin(), vec.end());
  vec.resize(unique(vec.begin(), vec.end()) - vec.begin());
  int low = 0, high = vec.size() - 1, mid;
  while (low <= high) {
    mid = (low + high) / 2;
    if (ck(vec[mid]))
      high = mid - 1;
    else
      low = mid + 1;
  }
  if (low == vec.size())
    cout << -1;
  else
    cout << vec[low];
  return 0;
}
