def f l,a,c
(a-l).map{|i|l.all?{|j|c[i].member? j}?f(l+[i],a,c):l.size}.max
end
while gets[0]>?0
a=(0..$_.to_i-1).to_a
b=a.map{eval"[#{gets}]"}
c=a.map{[]}
a.product(a).map{|i,j|Math.hypot(*b[i].zip(b[j]).map{|i,j|i-j})<2&&c[i]<<j}
p f([],a,c)
end