#include <bits/stdc++.h>
#pragma comment(linker, "/stack:256000000")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
mt19937_64 gen(time(NULL));
ll const mod = 1e9 + 7;
namespace {
ll mul(ll a, ll b) {
  ll val = a * b - (ll)((ld)a * b / mod) * mod;
  if (val < 0) val += mod;
  if (val >= mod) val -= mod;
  return val;
}
ll poww(ll a, ll b) {
  ll val = 1;
  a %= mod;
  while (b > 0) {
    if (b % 2) val = mul(a, val);
    a = mul(a, a);
    b >>= 1;
  }
  return val % mod;
}
ll inv(ll a) { return poww(a, mod - 2); }
}  // namespace
ll const maxn = 3e5 + 5;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
vector<pair<ll, ll>> g[maxn];
vector<ll> a;
ll n, m, t;
bool check(ll mid) {
  ll kek = a[mid];
  ll time = 0;
  ll cur = 0;
  while (cur < n + 1) {
    ll rofl = -1;
    if (g[cur + 1].size()) {
      for (auto p : g[cur + 1]) {
        if (p.second > kek) {
          rofl = max(p.first, rofl);
        }
      }
    }
    if (rofl == -1) {
      cur++;
      time++;
    } else {
      ll right = rofl;
      ll curr = cur;
      while (right < n && curr < right) {
        if (g[curr + 1].size()) {
          for (auto p : g[curr + 1]) {
            if (p.second > kek) {
              right = max(p.first, right);
            }
          }
        }
        curr++;
      }
      ll left = cur + 1;
      time += right - left + 1;
      time += right - left + 1;
      time += right - left + 1;
      cur = right;
    }
  }
  return (time <= t);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ll k;
  cin >> m >> n >> k >> t;
  a.resize(m);
  for (ll i = 0; i < m; i++) cin >> a[i];
  sort(a.begin(), a.end());
  for (ll i = 0; i < k; i++) {
    ll l, r, d;
    cin >> l >> r >> d;
    g[l].push_back({r, d});
  }
  if (check(0)) {
    cout << m << endl;
    return 0;
  }
  ll l = 0;
  ll r = m;
  while (l < r - 1) {
    ll mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  cout << m - r;
  return 0;
}
