# Encoding: utf-8

# Header {{{
def assert(p)
  raise 'Assertion Failed' unless p
end

# Constants {{{
INF = 10**9
# }}}

# IO {{{
class MyIO
  def initialize
    @source = $stdin
  end

  # @param filename [String]
  def set_source(filename)
    @source = File.open(filename, 'r')
  end

  def intl
    splitl.map(&:to_i)
  end

  def splitl
    @source.gets.chomp.split(' ')
  end

  def gets
    @source.gets.chomp
  end
end

io = MyIO.new
# }}}

# }}}

# io.set_source('inputs/0.txt')

while true
  n, d = io.intl
  break if n == 0

  missiles = Array.new(n) { [] }
  n.times do |i|
    c = io.intl
    c.shift
    missiles[i] = c
  end

  maxs, mins = 0, INF
  maxi, mini = nil, nil
  sums = Array.new(n) { [] }
  n.times do |i|
    sum = missiles[i].reduce(:+)
    sums[i] = sum
    if sum > maxs
      maxs, maxi = sum, i
    end
    if sum < mins
      mins, mini = sum, i
    end
  end

  disposed = true
  while disposed
    disposed = false
    n.times do |i|
      next if missiles[i].empty?
      next if i == maxi
      nsum = sums[i] - missiles[i].last
      next if maxs - nsum > d

      sums[i] -= missiles[i].pop
      disposed = true
      if nsum < mins
        mini = i
        mins = nsum
      end
    end

    # Try removing from max sum country
    maxs2, maxi2 = 0, nil
    n.times do |i|
      next if i == maxi
      if sums[i] > maxs2
        maxs2, maxi2 = sums[i], i
      end
    end

    if maxi2.nil?
      missiles[maxi] = []
      break
    end

    while sums[maxi] - missiles[maxi].last >= maxs2
      sums[maxi] -= missiles[maxi].pop
    end

    ns = sums[maxi] - missiles[maxi].last
    if ns < mins
      next if maxs2 - ns > d
      mins, mini = ns, maxi
    end
    disposed = true
    sums[maxi] -= missiles[maxi].pop
    maxs, maxi = maxs2, maxi2
  end

  if missiles.all? { |m| m.empty? }
    puts "YES"
  else
    puts "NO"
  end
end

# vim: foldmethod=marker