def read():

  return list(map(int,input().split()))



while 1:

  try:

    n,w,h=read()

    bases=[(0,0,0)]*n

    for i in range(n):

      bases[i]=read()

  except: break

  

  res1=True

  ls,rs=list(zip(*sorted([(x-w,x+w) for x,y,w in bases],key=lambda lr:lr[0])))

  x=0

  for l,r in zip(ls,rs):

    res1&=l<=x

    x=max(x,r)

  res1&=w<=x

  

  res2=True

  ls,rs=list(zip(*sorted([(y-w,y+w) for x,y,w in bases],key=lambda lr:lr[0])))

  x=0

  for l,r in zip(ls,rs):

    res2&=l<=x

    x=max(x,r)

  res2&=h<=x

  

  print(("Yes" if res1 or res2 else "No"))
def read():

  return list(map(int,input().split()))



def ok(width,xs,ws):

  x=0

  for l,r in sorted((x-w,x+w) for x,w in zip(xs,ws)):

    if x<l: return False

    x=max(x,r)

  return width<=x



while 1:

  try:

    n,w,h=read()

    xs,ys,ws=([0]*n for _ in range(3))

    for i in range(n):

      xs[i],ys[i],ws[i]=read()

  except: break

  print(("Yes" if ok(w,xs,ws) or ok(h,ys,ws) else "No"))
def read():
    return list(map(int, input().split()))


while 1:
    try:
        n, w, h = read()
        bases = [(0, 0, 0)] * n
        for i in range(n):
            bases[i] = read()
    except:
        break
    res1 = True
    ls, rs = list(
        zip(*sorted([(x - w, x + w) for x, y, w in bases], key=lambda lr: lr[0]))
    )
    x = 0
    for l, r in zip(ls, rs):
        res1 &= l <= x
        x = max(x, r)
    res1 &= w <= x
    res2 = True
    ls, rs = list(
        zip(*sorted([(y - w, y + w) for x, y, w in bases], key=lambda lr: lr[0]))
    )
    x = 0
    for l, r in zip(ls, rs):
        res2 &= l <= x
        x = max(x, r)
    res2 &= h <= x
    print(("Yes" if res1 or res2 else "No"))

def read():
    return list(map(int, input().split()))


def ok(width, xs, ws):
    x = 0
    for l, r in sorted((x - w, x + w) for x, w in zip(xs, ws)):
        if x < l:
            return False
        x = max(x, r)
    return width <= x


while 1:
    try:
        n, w, h = read()
        xs, ys, ws = ([0] * n for _ in range(3))
        for i in range(n):
            xs[i], ys[i], ws[i] = read()
    except:
        break
    print(("Yes" if ok(w, xs, ws) or ok(h, ys, ws) else "No"))

+ + +def ok(width, xs, ws): +    x = 0 +    for l, r in sorted((x - w, x + w) for x, w in zip(xs, ws)): +        if x < l: +            return False +        x = max(x, r) +    return width <= x -        bases = [(0, 0, 0)] * n +        xs, ys, ws = ([0] * n for _ in range(3)) -            bases[i] = read() +            xs[i], ys[i], ws[i] = read() -    res1 = True -    ls, rs = list( -        zip(*sorted([(x - w, x + w) for x, y, w in bases], key=lambda lr: lr[0])) -    ) -    x = 0 -    for l, r in zip(ls, rs): -        res1 &= l <= x -        x = max(x, r) -    res1 &= w <= x -    res2 = True -    ls, rs = list( -        zip(*sorted([(y - w, y + w) for x, y, w in bases], key=lambda lr: lr[0])) -    ) -    x = 0 -    for l, r in zip(ls, rs): -        res2 &= l <= x -        x = max(x, r) -    res2 &= h <= x -    print(("Yes" if res1 or res2 else "No")) +    print(("Yes" if ok(w, xs, ws) or ok(h, ys, ws) else "No"))