Language: C++

using namespace std;
//typedef pair<double,double> P;
int main()
{
  int n;
  for(;scanf("%d",&n),n;)
    {
      vector<pair<double,double> >circle;
      for(int i=0;i<n;i++)
	{
	  double tmp1,tmp2;
	  char buf;
	  cin>>tmp1>>buf>>tmp2;
	  circle.push_back(make_pair(tmp1,tmp2));
	}
      int ans=1;
      for(int i=0;i<n;i++)
	{
	  for(int j=0;j<n;j++)      
	    {
	      int count=0;
	      double xc1=circle[i].first;
	      double xc2=circle[j].first;
	      double yc1=circle[i].second;
	      double yc2=circle[j].second;		  
	      if(i!=j && (xc1-xc2)*(xc1-xc2)+(yc1-yc2)*(yc1-yc2)<=4.0)
		{
		  int count=2;
		  for(int k=0;k<n;k++)      
		    {		      
		      double xc3=circle[k].first;
		      double yc3=circle[k].second;
		      if(i!=k &&j!=k&&
			 (xc1-xc3)*(xc1-xc3)+(yc1-yc3)*(yc1-yc3)<=4.0 &&
			 (xc2-xc3)*(xc2-xc3)+(yc2-yc3)*(yc2-yc3)<=4.0)
			{
			  //	  cout<<i<<" "<<j<<" "<<k<<endl;
			  count++;
			}
		    }
		  ans=max(count,ans);
		}	      
	    }
	}
      cout<<ans<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'scanf' was not declared in this scope
    6 |   for(;scanf("%d",&n),n;)
      |        ^~~~~
a.cc:8:7: error: 'vector' was not declared in this scope
    8 |       vector<pair<double,double> >circle;
      |       ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:8:14: error: 'pair' was not declared in this scope
    8 |       vector<pair<double,double> >circle;
      |              ^~~~
a.cc:1:1: note: 'std::pair' is defined in header '<utility>'; this is probably fixable by adding '#include <utility>'
  +++ |+#include <utility>
    1 | using namespace std;
a.cc:8:19: error: expected primary-expression before 'double'
    8 |       vector<pair<double,double> >circle;
      |                   ^~~~~~
a.cc:13:11: error: 'cin' was not declared in this scope
   13 |           cin>>tmp1>>buf>>tmp2;
      |           ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:14:11: error: 'circle' was not declared in this scope
   14 |           circle.push_back(make_pair(tmp1,tmp2));
      |           ^~~~~~
a.cc:14:28: error: 'make_pair' was not declared in this scope
   14 |           circle.push_back(make_pair(tmp1,tmp2));
      |                            ^~~~~~~~~
a.cc:14:28: note: 'std::make_pair' is defined in header '<utility>'; this is probably fixable by adding '#include <utility>'
a.cc:22:26: error: 'circle' was not declared in this scope
   22 |               double xc1=circle[i].first;
      |                          ^~~~~~
a.cc:41:23: error: 'max' was not declared in this scope
   41 |                   ans=max(count,ans);
      |                       ^~~
a.cc:45:7: error: 'cout' was not declared in this scope
   45 |       cout<<ans<<endl;
      |       ^~~~
a.cc:45:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:45:18: error: 'endl' was not declared in this scope
   45 |       cout<<ans<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;