def consistent(LRD):
    L, R, D = zip(*LRD)
    arcs = dict(zip(zip(L, R), D))
    for u, v, d in LRD:
        for w in range(u + 1, v):
            if (u, w) in arcs and (w, v) in arcs:
                if arcs[u, w] + arcs[w, v] != arcs[u, v]:
                    return False
    return True

if consistent(LRD):
    print('Yes')
else:
    print('No')