def g n=0;gets.split.map{|c|[c.to_i,n]}end l=((g;g)+(g;g 1)).sort.reverse p [0,1].map{|c|v=21;a=l.count{|i,j|i