$dataset = Hash.new

def get_data
  while gets
    l = $_.chomp
    break if l.empty?
    id,date = l.split(',').map(&:to_i)
    if !$dataset[id]
      $dataset[id] = [date] 
    else
      $dataset[id] << date 
    end
  end
end

get_data
temp = Marshal.load(Marshal.dump($dataset))
get_data
$dataset.sort.each{|x| print x.first," ",x.last.size,"\n" if $dataset[x.first].size != temp[x.first].size}