loop do
    n, d = gets.split.map(&:to_i)
    break if n == 0

    a = (1..n).map { m = gets.split.map(&:to_i)[1..-1]; [m.inject(:+) || 0, *m]}

    l = a.map(&:first).min
    a.each do |c|
        while c[0] > l && c[0] - c[-1] >= l
            c[0] -= c.pop
        end
    end

    stack = [a]
    reached = {l => 1}

    ok = false
    until stack.empty?
        state = stack.pop
        (0..n-1).each do |i|
            next if state[i].size == 1
            l = state[i][0] - state[i][-1]
            next if reached[l]
            new_state = state.map{|c| c.dup}
            new_state[i][0] -= new_state[i].pop
            h = new_state.map(&:first).max 
            next if h - l > d

            if l == 0
                ok = true
                stack = []
                break
            end 
            reached[l] = 1

            new_state.each do |c|
                while c[0] > l && c[0] - c[-1] >= l
                    c[0] -= c.pop
                end
            end

            stack << new_state
        end
    end

    puts ok ? 'Yes' : 'No'
end