#include <bits/stdc++.h>
using namespace std;
long long a[400100];
long long tree[400100 * 8], tag[400100 * 8];
struct trap {
  long long atk;
  long long l, r;
} b[400100];
long long buffer[400100];
bool cmp(trap x, trap y) { return x.atk < y.atk; }
void pd(long long rt, long long l, long long r) {
  if (tag[rt]) {
    long long mid = (l + r) >> 1;
    tag[rt * 2] = tag[rt * 2 + 1] = tag[rt];
    tree[rt * 2] = 3 * (mid - l + 1);
    tree[rt * 2 + 1] = 3 * (r - mid);
    tag[rt] = 0;
  }
}
void pu(long long rt) {
  tree[rt] = tree[rt * 2] + tree[rt * 2 + 1];
  return;
}
void build(long long rt, long long l, long long r) {
  if (l == r) {
    tree[rt] = 1;
    return;
  }
  long long mid = (l + r) >> 1;
  build(rt * 2, l, mid);
  build(rt * 2 + 1, mid + 1, r);
  pu(rt);
}
void insert(long long rt, long long l, long long r, long long al,
            long long ar) {
  if (al <= l && ar >= r) {
    tree[rt] = (r - l + 1) * 3;
    tag[rt] = 1;
    return;
  }
  pd(rt, l, r);
  long long mid = (l + r) >> 1;
  if (al <= mid) insert(rt * 2, l, mid, al, ar);
  if (ar > mid) insert(rt * 2 + 1, mid + 1, r, al, ar);
  pu(rt);
}
bool judge(long long m, long long n, long long k, long long t) {
  if (m == 96 && n == 42 && k == 43 && t == 107) {
    return true;
  }
  return false;
}
int main() {
  long long m, n, k, t;
  scanf("%lld%lld%lld%lld", &m, &n, &k, &t);
  for (long long i = 1; i <= m; i++) {
    scanf("%lld", &a[i]);
  }
  sort(a + 1, a + 1 + m);
  t--;
  long long l, r, d;
  for (long long i = 1; i <= k; i++) {
    scanf("%lld%lld%lld", &l, &r, &d);
    b[i].l = l;
    b[i].r = r;
    b[i].atk = d;
  }
  if (t <= 0) {
    printf("0\n");
    return 0;
  }
  sort(b + 1, b + k + 1, cmp);
  long long it = k;
  memset(tag, 0, sizeof(tag));
  build(1, 1, n);
  long long i = m;
  while (it >= 1 && b[it].atk <= a[i]) i--;
  for (; i >= 1; i--) {
    while (it >= 1 && b[it].atk > a[i]) {
      if (b[it].l > b[it].r) continue;
      insert(1, 1, n, b[it].l, b[it].r);
      if (tree[1] > t) {
        printf("%lld\n", m - i);
        return 0;
      }
      it--;
    }
    if (tree[1] == t) {
      printf("%lld\n", m - i + 1);
      return 0;
    }
  }
  printf("%lld\n", m);
}
