N,W,H=gets.split.map(&:to_i)

hori = [0]*(W+2)
vert = [0]*(H+2)

N.times{
  x,y,w=gets.split.map(&:to_i)
  hori[[x-w,0].max] += 1
  hori[[x+w+1,W+1].min] -= 1
  vert[[y-w,0].max] += 1
  vert[[y+w+1,H+1].min] -= 1
}

hori = hori.inject([[],0]){|(s1,s2),r|[s1+[s2+r],s2+r]}[0]
vert = vert.inject([[],0]){|(s1,s2),r|[s1+[s2+r],s2+r]}[0]

puts (hori[0..-2].all?{|i|i>0}||vert[0..-2].all?{|i|i>0})?"Yes":"No"


