#include <bits/stdc++.h>
using namespace std;
vector<pair<int, pair<int, int> > > traps;
vector<pair<int, int> > temp;
int a[200009], m, n, k, t, maxi[200009];
bool comp(int val) {
  int i, j, t1, t2, t3, t4, ans, lim, cur, pos;
  lim = a[val - 1];
  temp.clear();
  for (i = 0; i < k; i++) {
    if (traps[i].second.second > lim) {
      temp.push_back(make_pair(traps[i].first, traps[i].second.first));
    }
  }
  ans = n + 1;
  sort(temp.begin(), temp.end());
  for (i = 0; i < (int)temp.size();) {
    cur = i;
    pos = temp[i].second;
    while (temp[cur].first <= pos && cur < (int)temp.size()) {
      pos = max(pos, temp[cur].second);
      cur++;
    }
    ans += 2 * (pos - (temp[i].first - 1));
    i = cur;
  }
  return (ans <= t);
}
int main() {
  int i, j, t1, t2, t3, t4, low, mid, high, ans;
  scanf("%d %d %d %d", &m, &n, &k, &t);
  for (i = 0; i < m; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 0; i < k; i++) {
    scanf("%d %d %d", &t1, &t2, &t3);
    traps.push_back(make_pair(t1, make_pair(t2, t3)));
  }
  sort(a, a + m);
  reverse(a, a + m);
  ans = 0;
  low = 1;
  high = m;
  while (low <= high) {
    mid = (low + high) / 2;
    if (comp(mid)) {
      ans = mid;
      low = mid + 1;
    } else {
      high = mid - 1;
    }
  }
  printf("%d\n", ans);
  return 0;
}
