loop do
  n = gets.to_i
  break if n.zero?
  cs = n.times.map { gets.split(/,/).map(&:to_f) }
  check = lambda do |a, b, c, d, x, y|
    a <= x && x <= c && b - 1 <= y && y <= d + 1 ||
    b <= y && y <= d && a - 1 <= x && x <= c + 1 ||
    (x-a)**2 + (y-b)**2 <= 1 ||
    (x-a)**2 + (y-d)**2 <= 1 ||
    (x-c)**2 + (y-b)**2 <= 1 ||
    (x-c)**2 + (y-d)**2 <= 1
  end
  r = 1
  rec = lambda do |a, b, c, d|
    p, q = (a+c)/2, (b+d)/2
    [[a, b, p, q], [p, b, c, q], [a, q, p, d], [p, q, c, d]].map {|as| [-cs.count {|x, y| check[*as, x, y] }, as] }.sort!.each do |m, as|
      m = -m
      if m > r
        if as[2] - as[0] < 1e-6
          r = m
          break
        end
        rec[*as]
      else
        break
      end
    end
  end
  rec[0.0, 0.0, 10.0, 10.0]
  p r
end