#include <bits/stdc++.h>
using namespace std;
long long modx(long long Base, long long exponent) {
  long long ans = 1;
  if (Base == 1) return Base;
  while (exponent) {
    if (exponent & 1) ans = (ans * Base) % 1000000007LL;
    Base = (Base * Base) % 1000000007LL;
    exponent = exponent >> 1;
  }
  return ans;
}
long long inmodx(long long num) { return (modx(num, 1000000007LL - 2LL)); }
bool cmp(pair<pair<int, int>, int> a, pair<pair<int, int>, int> b) {
  if (a.first.second < b.first.second) return 1;
  if (a.first.second > b.first.second) return 0;
  if (a.first.first <= b.first.first) return 1;
  return 0;
}
const int N = (15e2) + 9;
const int M = (N << 2) + 9;
const int LOGN = ((int)log2(N)) + 3;
const int LOGM = ((int)log2(M)) + 3;
const int BUCK = 450;
int a[N], arr[N], cnt[N], dp[N][N];
int n, s, m, k, c;
int sum(int l, int r) {
  if (l > r) return 0;
  return (cnt[r] - cnt[l - 1]);
}
void update(int &a, int b) {
  a = max(a, b);
  return;
}
bool func(int x) {
  int i, j, ans = 0;
  for (i = (1); i < (n + 1); i++) cnt[i] = (a[i] <= x);
  for (i = (1); i < (n + 1); i++) cnt[i] += cnt[i - 1];
  for (i = (1); i < (n + 1); i++)
    for (j = (1); j < (m + 1); j++) dp[i][j] = -1000000011;
  dp[0][0] = 0;
  for (i = (0); i < (n); i++)
    for (j = (0); j < (m + 1); j++)
      if (dp[i][j] >= 0) {
        update(dp[i + 1][j], dp[i][j]);
        if (arr[i + 1] > i)
          update(dp[arr[i + 1]][j + 1], dp[i][j] + sum(i + 1, arr[i + 1]));
      }
  for (i = (0); i < (n + 1); i++)
    for (j = (0); j < (m + 1); j++) ans = max(ans, dp[i][j]);
  return (ans >= k);
}
int binsea(int l, int r) {
  if (l > r) return 1000000011;
  int mid = (l + r) >> 1;
  if (func(mid)) return min(mid, binsea(l, mid - 1));
  return binsea(mid + 1, r);
}
void solve() {
  int i, l, r, ans;
  cin >> n >> s >> m >> k;
  for (i = (1); i < (n + 1); i++) cin >> a[i];
  for (i = (1); i < (s + 1); i++) {
    cin >> l >> r;
    arr[l] = max(arr[l], r);
  }
  for (i = (1); i < (n + 1); i++) update(arr[i], arr[i - 1]);
  ans = binsea(1, 1000000011);
  if (ans == 1000000011) ans = -1;
  cout << ans << '\n';
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  clock_t clk;
  clk = clock();
  int t = 1, cs;
  cout << fixed << setprecision(9);
  for (cs = (1); cs < (t + 1); cs++) {
    solve();
  }
  clk = clock() - clk;
  cerr << fixed << setprecision(6) << "Time: " << ((double)clk) / CLOCKS_PER_SEC
       << "\n";
  return 0;
}
