n, W, H = gets.split.map(&:to_i)
hor = Array.new(W+1,0)
ver = Array.new(H+1,0)
n.times do
    x, y, w = gets.split.map(&:to_i)
    hor[[x - w, 0].max] += 1
    hor[x + w + 1] -= 1 if x + w + 1 <= W
    ver[[y - w, 0].max] += 1
    ver[y + w + 1] -= 1 if y + w + 1 <= H
end
W.times do |i|
    hor[i+1] += hor[i]
end
H.times do |i|
    ver[i+1] += ver[i]
end
puts hor.all?{|k| k >= 1} || ver.all?{|k| k >= 1} ? "Yes" : "No"