#include <bits/stdc++.h>
namespace io
{
char buf[1 << 20], *p1(buf), *p2(buf), c;
#define gc() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 20, stdin), p1 == p2) ? EOF : *p1++)
template <typename _Tp> inline void read(_Tp& x)
{ x = 0; while (!isdigit(c = gc())); while (x = (x << 1) + (x << 3) + (c ^ 48), isdigit(c = gc())); }
template <typename _Tp, typename... Args> inline void read(_Tp& x, Args&... args) { read(x), read(args...); }
char pbuf[1 << 20], *pp(pbuf), sta[30], *top(sta);
#define flush() (fwrite(pbuf, 1, pp - pbuf, stdout), pp = pbuf)
#define pc(c) (pp - pbuf == 1 << 20 ? flush() : 0, *pp++ = (c))
inline void put(const char* s) { while (*s) pc(*s++); pc('\n'); }
struct flusher { inline ~flusher(void) { flush(); } } ioflush;
}
using io::read;
using io::put;
using u32 = long long;
using u64 = long long;
constexpr u32 N(2e5+7);
u32 c, T, n, a[N], b[N], t[N], sor[N], tm;
struct segment_tree
{
struct node { u32 L, R, p_L, p_R; u64 p_sum; bool tg; } tr[N << 2];
#define Ls (i << 1)
#define Rs (Ls | 1)
#define M ((L + R) >> 1)
#define len(i) (tr[i].R - tr[i].L + 1)
#define push_up(i) (tr[i].p_L = tr[Ls].p_L, tr[i].p_R = tr[Rs].p_R, tr[i].p_sum = tr[Ls].p_sum + tr[Rs].p_sum)
inline void push_down(const u32& i)
{
tr[Ls].p_L = tr[i].p_L, tr[Ls].p_R = tr[Ls].p_L + tr[Ls].R - tr[Ls].L, tr[Ls].p_sum = (tr[Ls].p_L + tr[Ls].p_R) * len(Ls) >> 1;
tr[Rs].p_L = tr[Ls].p_R + 1, tr[Rs].p_R = tr[i].p_R, tr[Rs].p_sum = (tr[Rs].p_L + tr[Rs].p_R) * len(Rs) >> 1;
tr[Ls].tg = tr[Rs].tg = true, tr[i].tg = false;
}
void build(const u32& i, const u32& L, const u32& R)
{
tr[i].L = L, tr[i].R = R, tr[i].tg = false; if (L == R) { tr[i].p_L = tr[i].p_R = tr[i].p_sum = a[L]; return; }
build(Ls, L, M), build(Rs, M + 1, R); push_up(i);
}
u32 qx, qL, qR; int dt;
void find_L(const u32& i)
{
if (tr[i].L == tr[i].R) { qL = tr[i].L; return; } if (tr[i].tg) push_down(i);
(tr[Rs].L <= qR && tr[Ls].p_R + qR <= qx + tr[Ls].R) ? find_L(Rs) : find_L(Ls);
}
void find_R(const u32& i)
{
if (tr[i].L == tr[i].R) { qR = tr[i].R; return; } if (tr[i].tg) push_down(i);
(qL <= tr[Ls].R && qx + tr[Rs].L <= tr[Rs].p_L + qL) ? find_R(Ls) : find_R(Rs);
}
void modify(const u32& i)
{
if (qL <= tr[i].L && tr[i].R <= qR)
{
dt += tr[i].p_sum, tr[i].p_L = qx + tr[i].L - qL, tr[i].p_R = qx + tr[i].R - qL;
tr[i].p_sum = (tr[i].p_L + tr[i].p_R) * len(i) >> 1, dt -= tr[i].p_sum, tr[i].tg = true; return;
}
if (tr[i].tg) push_down(i); (qL <= tr[Ls].R) ? modify(Ls) : (void)0; (tr[Rs].L <= qR) ? modify(Rs) : (void)0; push_up(i);
}
inline u32 query_L(const u32& i, const u32& p)
{ qR = i, qx = p; find_L(1); qx -= qR - qL, dt = 0; modify(1); return dt; }
inline u32 query_R(const u32& i, const u32& p)
{ qL = i, qx = p; find_R(1); dt = 0; modify(1); return -dt; }
} st;
signed main(void)
{
u32 i, idx; freopen("move.in", "r", stdin), freopen("move.out", "w", stdout);
read(c, T);
while (T--)
{
read(n); for (i = 1; i <= n; i++) read(a[i], b[i], t[i]), sor[i] = i; st.build(1, 1, n);
std::sort(sor + 1, sor + n + 1, [](const u32& x, const u32& y) { return t[x] < t[y]; });
for (tm = 0, i = 1; i <= n; i++)
{ idx = sor[i]; tm += (a[idx] > b[idx]) ? st.query_L(idx, b[idx]) : st.query_R(idx, b[idx]); if (tm > t[idx]) { tm = -1; break; } }
put((tm != -1) ? "Yes" : "No");
}
return 0;
}