Buggy python submission (verdict: Runtime Error):
import math,cmath
def f(m):
  b*=1j
  c=math.acos(a/2)
  p1=cmath.exp(b+c)+p0
  p2=cmath.exp(b-c)+p0
  s1,s2=0,0
  for k in N:
    if k==i or k==j:continue
    if abs(p1-X[k])<=1:s1+=1
    if abs(p2-X[k])<=1:s2+=1
  if s1>m:m=s1
  if s2>m:m=s2
  return m

while 1:
  n=input()
  if n==0:break
  N=range(n)
  X=[]
  for i in range(n):
    x,y=map(float,input())
    X+=[complex(x,y)]
  m=0
  for i in N:
    p0=X[i]
    for j in N:
      if i==j:continue
      a,b=cmath.polar(p0-X[j])
      if a<=2:m=f(m)
  print m+2

Fixed submission:
import math,cmath
def f(m):
  c=1j*math.acos(a/2)
  r=cmath.exp(b+c)+p
  s=cmath.exp(b-c)+p
  u,v=2,2
  for t in A:
    if t in[p,q]:continue
    if abs(t-r)-1<1e-6:u+=1
    if abs(t-s)-1<1e-6:v+=1
  return max(m,u,v)

while 1:
  n=input()
  if n==0:break
  N=range(n)
  A=[]
  for i in N:
    x,y=map(float,input())
    A+=[x+1j*y]
  m=1
  for i in N:
    p=A[i]
    for q in A[i+1:]:
      a,b=cmath.polar(q-p)
      b*=1j
      if a<=2:m=f(m)
  print m

Buggy python submission (verdict: Runtime Error):
e=1e-6
def f(m):
  c=1j*math.acos(a/2)
  p1=cmath.exp(b+c)+p
  p2=cmath.exp(b-c)+p
  s1,s2=2,2
  for k in N:
    if k in[i,i1]:continue
    if abs(X[k]-p1)<1+e:s1+=1
    if abs(X[k]-p2)<1+e:s2+=1
  return max(m,s1,s2)

while 1:
  n=input()
  if n==0:break
  N=range(n)
  X=[]
  for i in N:
    x,y=input()
    X+=[x+1j*y]
  m=1
  for i in N:
    p=X[i]
    for i1 in range(i+1,n):
      a,b=cmath.polar(X[i1]-p)
      b*=1j
      if a<=2:m=f(m)
  print m

Fixed submission:
import math,cmath
def f(m):
  c=1j*math.acos(a/2)
  r=cmath.exp(b+c)+p
  s=cmath.exp(b-c)+p
  u,v=2,2
  for t in A:
    if t in[p,q]:continue
    if abs(t-r)-1<1e-6:u+=1
    if abs(t-s)-1<1e-6:v+=1
  return max(m,u,v)

while 1:
  n=input()
  if n==0:break
  N=range(n)
  A=[]
  for i in N:
    x,y=map(float,input())
    A+=[x+1j*y]
  m=1
  for i in N:
    p=A[i]
    for q in A[i+1:]:
      a,b=cmath.polar(q-p)
      b*=1j
      if a<=2:m=f(m)
  print m

Buggy python submission (verdict: Runtime Error):
#include <complex>
#include <iostream>
#include <vector>
using namespace std;
typedef complex<double> cd;
vector<cd >A;
cd j=sqrt(-1),p,p1,p2;
double a,b;
int n;
int f(int m,int i1,int i2){
	int i,s1=2,s2=2;
	double c=acos(a/2);
	p1=polar(1.0,b+c)+p;
	p2=polar(1.0,b-c)+p;
	for(i=0;i<n;i++){
		if(i==i1||i==i2)continue;
		if(abs(A[i]-p1)-1<1e-6)s1++;
		if(abs(A[i]-p2)-1<1e-6)s2++;
	}
	if(m<s1)m=s1;
	if(m<s2)m=s2;
	return m;
}
int main(){
	int m,i,i1;
	char c;
	while(cin>>n,n!=0){
		A.clear();A.resize(n);
		for(i=0;i<n;i++){
			cin>>a>>c>>b;
			A[i]=cd(a,b);
		}
		m=1;
		for(i=0;i<n;i++){
			p=A[i];
			for(i1=i+1;i1<n;i1++){
				a=abs(A[i1]-p);
				b=arg(A[i1]-p);
				if(a<=2)m=f(m,i,i1);
			}
		}
		cout<<m<<endl;
	}
}

Fixed submission:
import math,cmath
def f(m):
  c=1j*math.acos(a/2)
  r=cmath.exp(b+c)+p
  s=cmath.exp(b-c)+p
  u,v=2,2
  for t in A:
    if t in[p,q]:continue
    if abs(t-r)-1<1e-6:u+=1
    if abs(t-s)-1<1e-6:v+=1
  return max(m,u,v)

while 1:
  n=input()
  if n==0:break
  N=range(n)
  A=[]
  for i in N:
    x,y=map(float,input())
    A+=[x+1j*y]
  m=1
  for i in N:
    p=A[i]
    for q in A[i+1:]:
      a,b=cmath.polar(q-p)
      b*=1j
      if a<=2:m=f(m)
  print m

Buggy python submission (verdict: Runtime Error):
#include <complex>
#include <iostream>
using namespace std;
typedef complex<double> cd;
cd A[100],j=sqrt(-1),p;
double a,b,d;
int n;
int f(int m,int i1,int i2){
	int i,s1=2,s2=2;
	cd p1=polar(1.0,b+d)+p,p2=polar(1.0,b-d)+p;
	for(i=0;i<n;i++){
		if(i==i1||i==i2)continue;
		if(abs(A[i]-p1)-1<1e-6)s1++;
		if(abs(A[i]-p2)-1<1e-6)s2++;
	}
	if(m<s1)m=s1;
	if(m<s2)m=s2;
	return m;
}
int main(){
	int m,i,i1;
	char c;
	while(cin>>n,n!=0){
		for(i=0;i<n;i++){
			cin>>a>>c>>b;
			A[i]=cd(a,b);
		}
		m=1;
		for(i=0;i<n;i++){
			p=A[i];
			for(i1=i+1;i1<n;i1++){
				a=abs(A[i1]-p);
				b=arg(A[i1]-p);
				d=acos(a/2);
				if(a<=2)m=f(m,i,i1);
			}
		}
		cout<<m<<endl;
	}
}

Fixed submission:
import math,cmath
def f(m):
  c=1j*math.acos(a/2)
  r=cmath.exp(b+c)+p
  s=cmath.exp(b-c)+p
  u,v=2,2
  for t in A:
    if t in[p,q]:continue
    if abs(t-r)-1<1e-6:u+=1
    if abs(t-s)-1<1e-6:v+=1
  return max(m,u,v)

while 1:
  n=input()
  if n==0:break
  N=range(n)
  A=[]
  for i in N:
    x,y=map(float,input())
    A+=[x+1j*y]
  m=1
  for i in N:
    p=A[i]
    for q in A[i+1:]:
      a,b=cmath.polar(q-p)
      b*=1j
      if a<=2:m=f(m)
  print m

Buggy python submission (verdict: Runtime Error):
#include <complex>
#include <iostream>
using namespace std;
complex<double> A[100],j=sqrt(-1),p;
double a,b,d;
int n;
int f(int m,int i1,int i2){
	int i,s1=2,s2=2;
	complex<double> p1=polar(1.0,b+d)+p,p2=polar(1.0,b-d)+p;
	for(i=0;i<n;i++){
		if(i==i1||i==i2)continue;
		if(abs(A[i]-p1)-1<1e-6)s1++;
		if(abs(A[i]-p2)-1<1e-6)s2++;
	}
	if(m<s1)m=s1;
	if(m<s2)m=s2;
	return m;
}
int main(){
	int m,i,i1;
	char c;
	while(cin>>n,n!=0){
		for(i=0;i<n;i++){
			cin>>a>>c>>b;
			A[i]=complex<double>(a,b);
		}
		m=1;
		for(i=0;i<n;i++){
			p=A[i];
			for(i1=i+1;i1<n;i1++){
				a=abs(A[i1]-p);
				b=arg(A[i1]-p);
				d=acos(a/2);
				if(a<=2)m=f(m,i,i1);
			}
		}
		cout<<m<<endl;
	}
}

Fixed submission:
import math,cmath
def f(m):
  c=1j*math.acos(a/2)
  r=cmath.exp(b+c)+p
  s=cmath.exp(b-c)+p
  u,v=2,2
  for t in A:
    if t in[p,q]:continue
    if abs(t-r)-1<1e-6:u+=1
    if abs(t-s)-1<1e-6:v+=1
  return max(m,u,v)

while 1:
  n=input()
  if n==0:break
  N=range(n)
  A=[]
  for i in N:
    x,y=map(float,input())
    A+=[x+1j*y]
  m=1
  for i in N:
    p=A[i]
    for q in A[i+1:]:
      a,b=cmath.polar(q-p)
      b*=1j
      if a<=2:m=f(m)
  print m

Buggy python submission (verdict: Runtime Error):
#include <complex>
#include <iostream>
#include <vector>
using namespace std;
typedef complex<double> P;
P A[100],j=sqrt(-1);
double a,b,d;
int n;
int f(int m,P p,P p1){
	int i,s1=2,s2=2;
	P p3=polar(1.0,b+d)+p,p4=polar(1.0,b-d)+p,q;
	for(i=0;i<n;i++){
		q=A[i];
		if(q==p||q==p1)continue;
		if(abs(q-p3)-1<1e-6)s1++;
		if(abs(q-p4)-1<1e-6)s2++;
	}
	if(m<s1)m=s1;
	if(m<s2)m=s2;
	return m;
}
int main(){
	int m,i,i1;
	char c;
	while(cin>>n,n!=0){
		for(i=0;i<n;i++){
			cin>>a>>c>>b;A[i]=P(a,b);
		}
		m=1;
		for(i=0;i<n;i++){
			P p=A[i],q;
			for(i1=i+1;i1<n;i1++){
				q=A[i1];a=abs(q-p);b=arg(q-p);d=acos(a/2);
				if(a<=2)m=f(m,p,q);
			}
		}
		cout<<m<<endl;
	}
}

Fixed submission:
import math,cmath
def f(m):
  c=1j*math.acos(a/2)
  r=cmath.exp(b+c)+p
  s=cmath.exp(b-c)+p
  u,v=2,2
  for t in A:
    if t in[p,q]:continue
    if abs(t-r)-1<1e-6:u+=1
    if abs(t-s)-1<1e-6:v+=1
  return max(m,u,v)

while 1:
  n=input()
  if n==0:break
  N=range(n)
  A=[]
  for i in N:
    x,y=map(float,input())
    A+=[x+1j*y]
  m=1
  for i in N:
    p=A[i]
    for q in A[i+1:]:
      a,b=cmath.polar(q-p)
      b*=1j
      if a<=2:m=f(m)
  print m