#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2e5 + 100;
int m, n, k, t, a[N];
struct data {
  int l, r, d;
} trap[N];
int sum[N];
bool can(int p) {
  int noob = a[m - p];
  for (int i = 0; i < n + 2; i++) sum[i] = 0;
  for (int i = 0; i < k; i++)
    if (trap[i].d > noob) {
      sum[trap[i].l]++;
      sum[trap[i].r + 1]--;
    }
  for (int i = 1; i < n + 2; i++) sum[i] += sum[i - 1];
  int now = 0;
  for (int i = 0; i <= n; i++) {
    if (sum[i + 1] == 0)
      now++;
    else {
      int j = i;
      while (sum[j + 1] > 0) j++;
      now += 3 * (j - i);
      i = j - 1;
    }
  }
  return now <= t;
}
int main() {
  scanf("%d %d %d %d", &m, &n, &k, &t);
  for (int i = 0; i < m; i++) scanf("%d", &a[i]);
  for (int i = 0; i < k; i++)
    scanf("%d %d %d", &trap[i].l, &trap[i].r, &trap[i].d);
  sort(a, a + m);
  int lo = 1, hi = m, ans = 0;
  while (lo <= hi) {
    int mid = (lo + hi) >> 1;
    if (can(mid))
      ans = mid, lo = mid + 1;
    else
      hi = mid - 1;
  }
  printf("%d\n", ans);
  return 0;
}
