a=[20106,20063,19892,20011,19874,20199,19898,20163,19956,19841] gets.chars{|x|a[x.to_i]-=1} puts"#{a.index -1} #{a.index 1}"