def f(a)
    b = a.sort
    min, max = b[0]
    b.each{|l, r|
        return [1,0] if max < l
        max = r if r > max
    }   
    [min, max]
end
n, w, h = gets.split.map &:to_i
x_intervals = []
y_intervals = []
n.times {
    x, y, w = gets.split.map &:to_i
    x_intervals << [x-w, x+w]
    y_intervals << [y-w, y+w]
}   
l1, r1 = f(x_intervals)
l2, r2 = f(y_intervals)
puts (l1 <= 0 && w <= r1) || (l2 <= 0 && h <= r2) ? 'Yes' : 'No'