#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out() { cerr << "\033[33;0m" << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
template <typename T>
void debug_out(T a[], int n) {
  cerr << "{" << to_string(a[0]);
  for (int i = 1; i < n; ++i) cerr << ", " << to_string(a[i]);
  cerr << "}";
  debug_out();
}
using LL = long long;
using PII = pair<int, int>;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
LL powmod(LL a, LL b, LL MOD) {
  LL ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % MOD;
    b >>= 1;
    a = a * a % MOD;
  }
  return ans % MOD;
}
const int N = 100005, MOD = 1e9 + 7, INF = 1e9;
int n, m, k, t;
int a[N << 1];
struct So {
  int l, r, d;
  bool operator<(const So& rhs) const {
    if (l != rhs.l) return l < rhs.l;
    return r < rhs.r;
  }
} s[N << 1];
void init() {
  scanf("%d%d%d%d", &n, &m, &k, &t);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n, greater<int>());
  for (int i = 1; i <= k; ++i) {
    scanf("%d%d%d", &s[i].l, &s[i].r, &s[i].d);
  }
  sort(s + 1, s + 1 + k);
}
int check(int cnt) {
  vector<So> v;
  int p = a[cnt];
  for (int i = 1; i <= k; ++i)
    if (s[i].d > p) v.push_back(s[i]);
  if (((int)(v.size())) == 0) return m + 1;
  int l = v[0].l, r = v[0].r, ans = 0;
  for (int i = 0; i < ((int)(v.size())); ++i) {
    if (v[i].l > r) {
      ans = ans + r - l + 1;
      l = v[i].l, r = v[i].r;
    } else {
      r = max(r, v[i].r);
    }
  }
  ans = ans + r - l + 1;
  return 2 * ans + m + 1;
}
void work() {
  int L = 1, R = n, mid, ans = 0;
  cerr << "\033[33;1m"
       << "["
       << "check(3)"
       << "] : ",
      debug_out(check(3));
  while (L <= R) {
    mid = L + R >> 1;
    if (check(mid) <= t)
      L = mid + 1, ans = mid;
    else
      R = mid - 1;
  }
  cout << ans << endl;
}
int main() {
  time_t tic = clock();
  int T = 1;
  while (T--) {
    init();
    work();
  }
  time_t toc = clock();
  cerr << "execute time = " << (toc - tic) / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
