#include <bits/stdc++.h>
using namespace std;
namespace uzumaki {}
using namespace uzumaki;
typedef std::priority_queue<long long int, std::vector<long long int>,
                            std::greater<long long int> >
    min_pq;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << "\n";
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
namespace uzumaki {
template <typename T>
T max(T A) {
  return A;
}
template <typename T, typename... args>
T max(T A, T B, args... S) {
  return max(A > B ? A : B, S...);
}
template <typename T>
T min(T A) {
  return A;
}
template <typename T, typename... args>
T min(T A, T B, args... S) {
  return min(A < B ? A : B, S...);
}
template <typename T, typename U>
std::ostream& operator<<(std::ostream& out, std::pair<T, U> a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T, typename U>
std::istream& operator>>(std::istream& in, std::pair<T, U>& a) {
  in >> a.first >> a.second;
  return in;
}
inline string inttos(long long int a) {
  std::stringstream soso;
  soso << a;
  return soso.str();
}
inline long long int stoint(const std::string& s) {
  std::stringstream soso;
  soso << s;
  long long x;
  soso >> x;
  return x;
}
inline std::string inttobin(long long int x) {
  return std::bitset<40>(x).to_string();
}
inline void swp(long long int& a, long long int& b) {
  auto temp = a;
  a = b;
  b = temp;
}
}  // namespace uzumaki
struct node {
  long long int l;
  long long int r;
  long long int d;
};
vector<long long int> a;
vector<node> v;
long long int m, n, k, t;
bool comp(node a, node b) { return a.d < b.d; }
bool predicate(long long int w) {
  vector<pair<long long int, long long int> > lol;
  for (long long int i = 0; i < k; i++) {
    if (v[i].d > a[w]) {
      lol.push_back({v[i].l - 1, -1});
      lol.push_back({v[i].r, 1});
    }
  }
  if ((long long int)lol.size() == 0) return 1;
  sort((lol).begin(), (lol).end());
  long long int cur = 0, last = lol[0].first, ans = 0;
  for (long long int i = 0; i < (long long int)lol.size(); i++) {
    cur -= lol[i].second;
    if (cur == 0) {
      ans += 2 * (lol[i].first - last);
      if (i + 1 < (long long int)lol.size()) last = lol[i + 1].first;
    }
  }
  return ans + n + 1 <= t;
}
void solve() {
  cin >> m >> n >> k >> t;
  for (long long int i = 0; i < m; i++) {
    long long int x;
    cin >> x;
    a.push_back(x);
  }
  sort((a).begin(), (a).end());
  for (long long int i = 0; i < k; i++) {
    long long int a, b, c;
    cin >> a >> b >> c;
    node x = {a, b, c};
    v.push_back(x);
  }
  long long int result = -1;
  long long int left = 0, right = m - 1;
  while (left <= right) {
    long long int mid = (left + right) / 2;
    if (predicate(mid)) {
      result = mid;
      right = mid - 1;
    } else {
      left = mid + 1;
    }
  }
  if (result == -1) {
    cout << "0"
         << "\n";
    return;
  }
  cout << m - result << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  for (long long int i = 0; i < t; i++) {
    solve();
  }
}
