#include <bits/stdc++.h>
using namespace std;
char getc() {
  char c = getchar();
  while ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && (c < '0' || c > '9'))
    c = getchar();
  return c;
}
int gcd(int n, int m) { return m == 0 ? n : gcd(m, n % m); }
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  return x * f;
}
int n, m, s, k, a[1510], c[1510], f[1510][1510], ans = -1;
bool flag[1510];
struct data {
  int x, y;
  bool operator<(const data& a) const { return x < a.x || x == a.x && y < a.y; }
  bool operator==(const data& a) const { return x == a.x && y == a.y; }
} b[1510], d[1510];
priority_queue<int> ins, del;
bool check(int u) {
  for (int i = 1; i <= n; i++)
    if (a[i] <= u)
      c[i] = 1;
    else
      c[i] = 0;
  for (int i = 1; i <= n; i++) c[i] += c[i - 1];
  memset(f, 0, sizeof(f));
  for (int j = 1; j <= s; j++) {
    int x = 0, t = 0;
    while (!ins.empty()) ins.pop();
    while (!del.empty()) del.pop();
    for (int i = 1; i <= m; i++) {
      while (x < i && b[x + 1].y < b[i].x)
        x++, del.push(f[x][j - 1] - c[b[x].y]), t = max(t, f[x][j - 1]);
      while (!del.empty() && ins.top() == del.top()) ins.pop(), del.pop();
      f[i][j] = max(t + c[b[i].y] - c[b[i].x - 1],
                    c[b[i].y] + (ins.empty() ? -1000000 : ins.top()));
      ins.push(f[i][j - 1] - c[b[i].y]);
    }
  }
  for (int i = 1; i <= m; i++)
    if (f[i][s] >= k) return 1;
  return 0;
}
signed main() {
  n = read(), m = read(), s = read(), k = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  for (int i = 1; i <= m; i++) b[i].x = read(), b[i].y = read();
  sort(b + 1, b + m + 1);
  m = unique(b + 1, b + m + 1) - b - 1;
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= m; j++)
      if (i != j && b[j].x <= b[i].x && b[j].y >= b[i].y) {
        flag[i] = 1;
        break;
      }
  int t = 0;
  for (int i = 1; i <= m; i++)
    if (!flag[i]) d[++t] = b[i];
  m = t;
  s = min(s, m);
  for (int i = 1; i <= m; i++) b[i] = d[i];
  sort(b + 1, b + m + 1);
  int l = 1, r = 1000000000;
  while (l <= r) {
    int mid = l + r >> 1;
    if (check(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  cout << ans;
  return 0;
}
