#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int read(T& x) {
  static char ch;
  static bool neg;
  for (ch = neg = 0; ch < '0' || '9' < ch; neg |= ch == '-', ch = getchar())
    ;
  for (x = 0; '0' <= ch && ch <= '9'; (x *= 10) += ch - '0', ch = getchar())
    ;
  return (x = neg ? -x : x);
}
template <class T>
inline void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void writeln(T x) {
  write(x);
  putchar('\n');
}
const int N = 2e5 + 10;
int m, n, k, t;
int a[N];
struct T {
  int l, r, d;
} trap[N];
int c[N];
inline bool check(int val) {
  int sum = 0;
  for (int i = 1; i <= k; i++) {
    if (trap[i].d > val) {
      c[trap[i].l]++;
      c[trap[i].r + 1]--;
    }
  }
  for (int i = 1, s = 0; i <= n + 1; i++) {
    s += c[i];
    if (s > 0) sum += 2;
  }
  for (int i = 1; i <= k; i++) {
    if (trap[i].d > val) {
      c[trap[i].l]--;
      c[trap[i].r + 1]++;
    }
  }
  return sum + n + 1 <= t;
}
int main(void) {
  read(m);
  read(n);
  read(k);
  read(t);
  for (int i = 1; i <= m; i++) read(a[i]);
  sort(a + 1, a + m + 1);
  for (int i = 1; i <= k; i++) {
    read(trap[i].l);
    read(trap[i].r);
    read(trap[i].d);
  }
  a[m + 1] = 1e9 + 10;
  int st = 1, en = m + 1;
  while (st != en) {
    int md = (st + en) >> 1;
    if (check(a[md]))
      en = md;
    else
      st = md + 1;
  }
  printf("%d\n", m - st + 1);
}
