n = read_line.to_i xy = (1..n).map { x, y = read_line.split.map &.to_i; {x, y} } ans = xy.each_with_index.group_by { |(x, y), i| {x % 5, y % 9, (x // 5 + y // 9) % 2} }.values.max_by(&.size).map(&.[1].succ) puts ans.size, ans.join(' ')