#include <bits/stdc++.h>
using namespace std;
int arr[1500];
int n, segs, choose, k;
pair<int, int> seg[1500];
bool below[1500];
int csum[1500 + 1];
void NO() {
  cout << "-1" << endl;
  exit(0);
}
int dp[1501][1501];
int lef[1501];
int getans(int pos, int nused) {
  if (nused == 0) return 0;
  if (pos == -1) return 0;
  int &ans = dp[pos][nused];
  if (ans == -1) {
    if (lef[pos] == -1)
      ans = getans(pos - 1, nused);
    else {
      ans = getans(lef[pos] - 1, nused - 1) + csum[pos + 1] - csum[lef[pos]];
      ans = max(ans, getans(lef[pos] - 1, nused));
      ans = max(ans, getans(pos - 1, nused));
    }
  }
  return ans;
}
bool cando(int num) {
  cerr << "trying " << num << endl;
  memset(below, 0, sizeof below);
  for (int i = 0; i < n; i++)
    if (arr[i] <= num) below[i] = true;
  for (int i = 0; i < n; i++) {
    csum[i + 1] = csum[i] + below[i];
  }
  memset(dp, -1, sizeof dp);
  return getans(n - 1, choose) >= k;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> segs >> choose >> k;
  memset(lef, -1, sizeof lef);
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < segs; i++) {
    cin >> seg[i].first >> seg[i].second;
    seg[i].first--;
    seg[i].second--;
    for (int j = seg[i].first; j <= seg[i].second; j++) {
      if (lef[j] == -1)
        lef[j] = seg[i].first;
      else
        lef[j] = min(lef[j], seg[i].first);
    }
  }
  int high = 1000000010, low = 0;
  while (high - low > 0) {
    int mid = (high + low) / 2;
    if (cando(mid)) {
      high = mid;
    } else {
      low = mid + 1;
    }
  }
  if (high > 1000000000)
    cout << -1 << endl;
  else
    cout << high << endl;
}
