#include <bits/stdc++.h>
using namespace std;
const int IINF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fll;
const double DINF = numeric_limits<double>::infinity();
const int MOD = 1000000007;
const double EPS = 1e-9;
const double PI = acos(-1.0);
const int DX[] = {1, 0, -1, 0, 1, -1, 1, -1};
const int DY[] = {0, 1, 0, -1, 1, -1, -1, 1};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long sqr(long long x) { return x * x; }
long long sqr(int x) { return (long long)x * x; }
double sqr(double x) { return x * x; }
long double sqr(long double x) { return x * x; }
mt19937 mmtw(960172);
long long rnd(long long x, long long y) {
  static uniform_int_distribution<long long> d;
  return d(mmtw) % (y - x + 1) + x;
}
const int N = 1555;
int n, s, m, k, s0;
int arr[N];
pair<int, int> segs0[N], segs[N];
int prv[N];
bool solve(int thr) {
  static int a[N];
  a[0] = 0;
  for (int i = 0; i < n; ++i) a[i + 1] = a[i] + (arr[i] < thr);
  static int d[N];
  for (int i = 0; i < s; ++i) {
    d[i] = a[segs[i].second] - a[segs[i].first];
  }
  for (int iter = 0; iter < m - 1; ++iter) {
    static int dm[N];
    dm[0] = 0;
    for (int i = 0; i < s; ++i) dm[i + 1] = max(dm[i], d[i]);
    static int nd[N];
    for (int i = 0; i < s; ++i) {
      int j = prv[i];
      nd[i] = d[j] + a[segs[i].second] - a[segs[j].second];
      nd[i] = max(nd[i], dm[j] + a[segs[i].second] - a[segs[i].first]);
    }
    memcpy(d, nd, sizeof(int) * s);
  }
  for (int i = 0; i < s; ++i)
    if (d[i] >= k) return true;
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> s0 >> m >> k;
  vector<int> allX;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    allX.push_back(arr[i]);
  }
  for (int i = 0; i < s0; ++i) {
    cin >> segs0[i].first >> segs0[i].second;
    --segs0[i].first;
  }
  for (int i = 0; i < s0; ++i) {
    int l = segs0[i].first, r = segs0[i].second;
    bool fail = false;
    for (int j = 0; j < s0; ++j) {
      int cl = segs0[j].first, cr = segs0[j].second;
      if (cl == l && cr == r) {
        if (i < j) {
          fail = true;
          break;
        }
      } else {
        if (cl <= l && r <= cr) {
          fail = true;
          break;
        }
      }
    }
    if (!fail) segs[s++] = segs0[i];
  }
  m = min(m, s);
  sort(segs, segs + s);
  for (int i = 0; i < s; ++i) {
    for (int j = 0; j <= i; ++j)
      if (segs[j].second >= segs[i].first) {
        prv[i] = j;
        break;
      }
  }
  if (!solve(IINF)) {
    cout << -1 << "\n";
    return 0;
  }
  sort((allX).begin(), (allX).end());
  allX.erase(unique((allX).begin(), (allX).end()), allX.end());
  int bl = 0, br = ((int)((allX).size()));
  while (br - bl > 1) {
    int mid = (bl + br) / 2;
    if (solve(allX[mid]))
      br = mid;
    else
      bl = mid;
  }
  cout << allX[bl] << "\n";
  return 0;
}
