//long time no ac
#include<bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";

#define     SPEED     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define 	ll          long long int
#define 	pb          push_back
#define 	pll         pair<ll,ll>
#define 	vll         vector<ll>
#define 	ff          first
#define 	ss          second
#define 	all(a)      (a).begin(),(a).end()
#define 	sz(x)       (ll)x.size()
#define 	hell        1000000007
#define 	rep(i,n)    for(i=0;i<n;i++)
#define 	repe(i,a,b) for(i=a;i<b;i++)
#define 	lbnd        lower_bound
#define 	ubnd        upper_bound
#define 	bs          binary_search
#define 	mp          make_pair

ll power(ll a,ll b)
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	ll c=power(a,b/2);
	if(b%2==0)
		return((c%hell)*(c%hell))%hell;
	return ((((c%hell)*(c%hell))%hell)*(a%hell))%hell;
}

/********************************************************/

//	d.erase(unique(all(d)), d.end());
ll f[100005]={0};

int main()
{
	SPEED;
	ll n,k,t,i,j,m,cs=0;
	t=1;
	vll v;
	// cin>>t;
	string s;
	while(t--)
	{
		cin>>n;
		// n=s.length();
		ll a[n];
		rep(i,n)
		{
			cin>>a[i];
			f[a[i]]=1;
		}
		rep(i,n)
		{
			rep(j,n)
			{
				if(i!=j)
					v.pb(a[i]+a[j]);
			}
		}
		v.erase(unique(all(v)), v.end());

		for(auto z:v)
		{
			ll h[100005],c=0;
			memset(h,0,sizeof(h));
			rep(i,n)
			{
				if(h[a[i]]==0 && f[z-a[i]]==1 && h[z-a[i]]==0 && a[i]!=z-a[i])
				{
					h[a[i]]=1;
					h[z-a[i]]=1;
					c++;
				}
			}
			cs=max(cs,c);
		}

		cout<<cs;
		if(t!=0)
	   		cout<<"\n";
	}
	return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";

#define     SPEED     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define 	ll          long long int
#define 	pb          push_back
#define 	pll         pair<ll,ll>
#define 	vll         vector<ll>
#define 	ff          first
#define 	ss          second
#define 	all(a)      (a).begin(),(a).end()
#define 	sz(x)       (ll)x.size()
#define 	hell        1000000007
#define 	rep(i,n)    for(i=0;i<n;i++)
#define 	repe(i,a,b) for(i=a;i<b;i++)
#define 	lbnd        lower_bound
#define 	ubnd        upper_bound
#define 	bs          binary_search
#define 	mp          make_pair

ll power(ll a,ll b)
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	ll c=power(a,b/2);
	if(b%2==0)
		return((c%hell)*(c%hell))%hell;
	return ((((c%hell)*(c%hell))%hell)*(a%hell))%hell;
}

/********************************************************/

//	d.erase(unique(all(d)), d.end());

ll h[200005]={0};
int main()
{
	SPEED;
	ll n,k,t,c=0,i,j,m,cs=0;
	t=1;

	// cin>>t;
	string s;
	while(t--)
	{
		cin>>n;
		// n=s.length();
		ll a[n];
		rep(i,n)
		{
			cin>>a[i];
		}
		rep(i,n)
		{
			rep(j,n)
			{
				if(i!=j) h[a[i]+a[j]]++;
			}
		}
		rep(i,200005)
			c=max(c,h[i]);

		cout<<c/2;
		if(t!=0)
	   		cout<<"\n";
	}
	return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";

#define     SPEED     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define 	ll          long long int
#define 	pb          push_back
#define 	pll         pair<ll,ll>
#define 	vll         vector<ll>
#define 	ff          first
#define 	ss          second
#define 	all(a)      (a).begin(),(a).end()
#define 	sz(x)       (ll)x.size()
#define 	hell        1000000007
#define 	rep(i,n)    for(i=0;i<n;i++)
#define 	repe(i,a,b) for(i=a;i<b;i++)
#define 	lbnd        lower_bound
#define 	ubnd        upper_bound
#define 	bs          binary_search
#define 	mp          make_pair

ll power(ll a,ll b)
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	ll c=power(a,b/2);
	if(b%2==0)
		return((c%hell)*(c%hell))%hell;
	return ((((c%hell)*(c%hell))%hell)*(a%hell))%hell;
}

/********************************************************/

//	d.erase(unique(all(d)), d.end());

ll h[200005]={0};
int main()
{
	SPEED;
	ll n,k,t,c=0,i,j,m,cs=0;
	t=1;

	// cin>>t;
	string s;
	while(t--)
	{
		cin>>n;
		// n=s.length();
		ll a[n];
		rep(i,n)
		{
			cin>>a[i];
		}
		sort(a,a+n);
		i=n-1;j=0;
		while(i>j)
		{
			h[a[i]+a[j]]++;
			i--;
			j++;
		}
		rep(i,100001)
			c=max(c,h[i]);

		cout<<c;
		if(t!=0)
	   		cout<<"\n";
	}
	return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";

#define     SPEED     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define 	ll          long long int
#define 	pb          push_back
#define 	pll         pair<ll,ll>
#define 	vll         vector<ll>
#define 	ff          first
#define 	ss          second
#define 	all(a)      (a).begin(),(a).end()
#define 	sz(x)       (ll)x.size()
#define 	hell        1000000007
#define 	rep(i,n)    for(i=0;i<n;i++)
#define 	repe(i,a,b) for(i=a;i<b;i++)
#define 	lbnd        lower_bound
#define 	ubnd        upper_bound
#define 	bs          binary_search
#define 	mp          make_pair

ll power(ll a,ll b)
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	ll c=power(a,b/2);
	if(b%2==0)
		return((c%hell)*(c%hell))%hell;
	return ((((c%hell)*(c%hell))%hell)*(a%hell))%hell;
}

/********************************************************/

//	d.erase(unique(all(d)), d.end());
ll f[100005]={0};

int main()
{
	SPEED;
	ll n,k,t,i,j,m,cs=0;
	t=1;
	vll v;
	// cin>>t;
	string s;
	while(t--)
	{
		cin>>n;
		// n=s.length();
		ll a[n];
		rep(i,n)
		{
			cin>>a[i];
			f[a[i]]=1;
		}
		rep(i,n)
		{
			rep(j,n)
			{
				if(i!=j)
					v.pb(a[i]+a[j]);
			}
		}
		v.erase(unique(all(v)), v.end());

		for(auto z:v)
		{
			ll h[n],c=0;
			memset(h,0,sizeof(h));
			rep(i,n)
			{
				if(h[i]==0 && f[z-a[i]]==1 && h[z-a[i]]==0)
				{
					h[i]=1;
					h[z-a[i]]=1;
					c++;
				}
			}
			cs=max(cs,c);
		}

		cout<<cs;
		if(t!=0)
	   		cout<<"\n";
	}
	return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";

#define     SPEED     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define 	ll          long long int
#define 	pb          push_back
#define 	pll         pair<ll,ll>
#define 	vll         vector<ll>
#define 	ff          first
#define 	ss          second
#define 	all(a)      (a).begin(),(a).end()
#define 	sz(x)       (ll)x.size()
#define 	hell        1000000007
#define 	rep(i,n)    for(i=0;i<n;i++)
#define 	repe(i,a,b) for(i=a;i<b;i++)
#define 	lbnd        lower_bound
#define 	ubnd        upper_bound
#define 	bs          binary_search
#define 	mp          make_pair

ll power(ll a,ll b)
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	ll c=power(a,b/2);
	if(b%2==0)
		return((c%hell)*(c%hell))%hell;
	return ((((c%hell)*(c%hell))%hell)*(a%hell))%hell;
}

/********************************************************/

//	d.erase(unique(all(d)), d.end());

ll h[100005]={0};
int main()
{
	SPEED;
	ll n,k,t,c=0,i,j,m,cs=0;
	t=1;

	// cin>>t;
	string s;
	while(t--)
	{
		cin>>n;
		// n=s.length();
		ll a[n];
		rep(i,n)
		{
			cin>>a[i];
		}
		sort(a,a+n);
		i=n-1;j=0;
		while(i>j)
		{
			h[a[i]+a[j]]++;
			i--;
			j++;
		}
		rep(i,100001)
			c=max(c,h[i]);

		cout<<c;
		if(t!=0)
	   		cout<<"\n";
	}
	return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";

#define     SPEED     ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define 	ll          long long int
#define 	pb          push_back
#define 	pll         pair<ll,ll>
#define 	vll         vector<ll>
#define 	ff          first
#define 	ss          second
#define 	all(a)      (a).begin(),(a).end()
#define 	sz(x)       (ll)x.size()
#define 	hell        1000000007
#define 	rep(i,n)    for(i=0;i<n;i++)
#define 	repe(i,a,b) for(i=a;i<b;i++)
#define 	lbnd        lower_bound
#define 	ubnd        upper_bound
#define 	bs          binary_search
#define 	mp          make_pair

ll power(ll a,ll b)
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	ll c=power(a,b/2);
	if(b%2==0)
		return((c%hell)*(c%hell))%hell;
	return ((((c%hell)*(c%hell))%hell)*(a%hell))%hell;
}

/********************************************************/

//	d.erase(unique(all(d)), d.end());

ll h[200005]={0};
int main()
{
	SPEED;
	ll n,k,t,c=0,i,j,m,cs=0;
	t=1;

	// cin>>t;
	string s;
	while(t--)
	{
		cin>>n;
		// n=s.length();
		ll a[n];
		rep(i,n)
		{
			cin>>a[i];
		}
		sort(a,a+n);
		i=n-1;j=0;
		while(i>=j)
		{
			h[a[i]+a[j]]++;
			i--;
			j++;
		}
		rep(i,100001)
			c=max(c,h[i]);

		cout<<c;
		if(t!=0)
	   		cout<<"\n";
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n;
int a[1<<10];int cnta[1<<10];int cntsum[1<<10];

int AnswerProblem;
int main()
{
    cin>>n;
    for (int i=1;i<=n;i++)cin>>a[i];
    for (int i=1;i<=n;i++)
        for (int j=i+1;j<n;j++)
    {
        cntsum[a[i]+a[j]]++;
    }
    for (int i=1;i<=n;i++)cnta[a[i]]++;

    for (int sumanswer=2;sumanswer<200000;sumanswer++)
    {
        Answerproblem=max(AnswerProblem,cnt[sumanswer]);
    }
    cout<<AnswerProblem<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n;
int a[1<<10];int cnta[1<<10];int cntsum[1<<10];

int AnswerProblem;
int main()
{
    cin>>n;
    for (int i=1;i<=n;i++)cin>>a[i];
    for (int i=1;i<=n;i++)
        for (int j=i+1;j<n;j++)
    {
        cntsum[a[i]+a[j]]++;
    }
    for (int i=1;i<=n;i++)cnta[a[i]]++;

    for (int sumanswer=2;sumanswer<200000;sumanswer++)
    {
        AnswerProblem=max(AnswerProblem,cnt[sumanswer]);
    }
    cout<<AnswerProblem<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n;
int a[1<<10];int cnta[1<<10];int cntsum[1<<18];

int AnswerProblem;
int main()
{
    cin>>n;
    for (int i=1;i<=n;i++)cin>>a[i];
    for (int i=1;i<=n;i++)
        for (int j=i+1;j<=n;j++)
    {
        cntsum[a[i]+a[j]]++;
    }
    for (int i=1;i<=n;i++)cnta[a[i]]++;

    for (int sumanswer=2;sumanswer<200000;sumanswer++)
    {
        AnswerProblem=max(AnswerProblem,cntsum[sumanswer]);
    }
    cout<<AnswerProblem<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n;
int a[1<<10];int cnta[1<<10];

int AnswerProblem;
int main()
{
    cin>>n;
    for (int i=1;i<=n;i++)cin>>a[i];
    for (int i=1;i<=n;i++)cnta[a[i]]++;

    for (int sumanswer=2;sumanswer<200000;sumanswer++)
    {
        int nowanswer=0;
        for (int i=1;i+i < sumanswer ; i++)
        {
            int j=sumanswer-i;
            if (cnta[i]&&cnta[j])
            {
                nowanswer++;
            }
        }
        AnswerProblem=max(AnswerProblem,nowanswer);
    }
    cout<<AnswerProblem<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n;
int a[1<<10];int cnta[1<<17];int cntsum[1<<18];

int AnswerProblem;
int main()
{
    cin>>n;
    for (int i=1;i<=n;i++)cin>>a[i];
    for (int i=1;i<=n;i++)
        for (int j=i+1;j<=n;j++)
    {
        cntsum[a[i]+a[j]]++;
    }
    for (int i=1;i<=n;i++)cnta[a[i]]++;

    for (int sumanswer=2;sumanswer<200000;sumanswer++)
    {
        AnswerProblem=max(AnswerProblem,cntsum[sumanswer]);
    }
    cout<<AnswerProblem<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n;
int a[1<<10];int cnta[1<<10];int cntsum[1<<10];

int AnswerProblem;
int main()
{
    cin>>n;
    for (int i=1;i<=n;i++)cin>>a[i];
    for (int i=1;i<=n;i++)
        for (int j=i+1;j<=n;j++)
    {
        cntsum[a[i]+a[j]]++;
    }
    for (int i=1;i<=n;i++)cnta[a[i]]++;

    for (int sumanswer=2;sumanswer<200000;sumanswer++)
    {
        AnswerProblem=max(AnswerProblem,cntsum[sumanswer]);
    }
    cout<<AnswerProblem<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;

int main()
{
    int n;
    scanf("%d",&n);
    vector<int>a(n);
    vector<int>b;
    int i,j;
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=0;i<n-1;i++)
    {
        for(j=i+1;j<n;j++)
        {
            b.push_back(a[i]+a[j]);
        }
    }
    sort(b.begin(),b.end());
    int m=0;int aa=1;
    for(i=0,j=i+1;(i<b.size())&&(j<b.size());)
    {
        aa=1;
        while(a[i]==a[j])
        {
          aa++;
          j++;
        }
        m=max(aa,m);
        i=j;
        j++;

    }

    printf("%d",m);
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;

int main()
{
    int n;
    scanf("%d",&n);
    vector<int>a(n);
    vector<int>b;
    int i,j;
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=0;i<n-1;i++)
    {
        for(j=i+1;j<n;j++)
        {
            b.push_back(a[i]+a[j]);
        }
    }
    sort(b.begin(),b.end());
    int m=0;int aa=1;
    for(i=0,j=i+1;(i<b.size())&&(j<b.size());)
    {
        aa=1;
        while(b[i]==b[j])
        {
          aa++;

          if(j<b.size())
          {
              j++;
          }
        }
        m=max(aa,m);
        i=j;
        j++;

    }

    printf("%d",m);
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;

int main()
{
    int n;
    scanf("%d",&n);
    vector<int>a(n);
    vector<int>b;
    int i,j;
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=0;i<n-1;i++)
    {
        for(j=i+1;j<n;j++)
        {
            b.push_back(a[i]+a[j]);
        }
    }
    sort(b.begin(),b.end());
    int m=1;int aa=1;
    for(i=0,j=i+1;(i<b.size())&&(j<b.size());)
    {
        aa=1;
        while(b[i]==b[j])
        {
          aa++;

          if(j<b.size())
          {
              j++;
          }
        }
        m=max(aa,m);
        i=j;
        j++;

    }

    printf("%d",m);
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;

int main()
{
    int n;
    scanf("%d",&n);
    vector<int>a(n);
    vector<int>b;
    int i,j;
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    for(i=0;i<n-1;i++)
    {
        for(j=i+1;j<n;j++)
        {
            b.push_back(a[i]+a[j]);
        }
    }
    sort(b.begin(),b.end());
    int m=0;int aa=1;
    for(i=0,j=i+1;(i<b.size())&&(j<b.size());)
    {
        aa=1;
        while(a[i]==a[j])
        {
          aa++;

          if(j<b.size())
          {
              j++;
          }
        }
        m=max(aa,m);
        i=j;
        j++;

    }

    printf("%d",m);
    return 0;

}


#include <bits/stdc++.h>
#define int long long int
#define MOD 1000000007
using namespace std;
void solve() {
    int n;
    cin >> n;
    vector <int> v;
    for(int i=0;i<n;i++) {
        int x;
        cin >> x;
        v.push_back(x);
    }
    int ans[200005] = {0};
    for(int i=0;i<n;i++) {
        for(int j=i+1;j<n;j++) {
                ans[v[i]+v[j]]++;
        }
    }
    int max = 0;
    for(int i=0;i<200005;i++) {
        if(ans[i] > max)
                max = ans[i];
    }
    cout << max << '\n';
    return ;
}
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    solve();
    return 0;
}


#include <bits/stdc++.h>
#define int long long int
#define MOD 1000000007
using namespace std;
void solve() {
    int n;
    cin >> n;
    vector <int> v;
    for(int i=0;i<n;i++) {
        int x;
        cin >> x;
        v.push_back(x);
    }
    int ans[n*(n-1)/2] = {0};
    for(int i=0;i<n;i++) {
        for(int j=i+1;j<n;j++) {
                ans[v[i]+v[j]]++;
        }
    }

    int max = 0;
    for(int i=0;i<n*(n-1)/2;i++) {
        if(ans[i] > max)
                max = ans[i];
    }
    cout << max << '\n';
    return ;
}
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    solve();
    return 0;
}


#include <bits/stdc++.h>
#define int long long int
#define MOD 1000000007
using namespace std;
void solve() {
    int n;
    cin >> n;
    vector <int> v;
    for(int i=0;i<n;i++) {
        int x;
        cin >> x;
        v.push_back(x);
    }
    int ans[n*(n-1)/2] = {0};
    for(int i=0;i<n;i++) {
        for(int j=i+1;j<n;j++) {
                ans[v[i]+v[j]]++;
        }
    }
    int max = 0;
    for(int i=0;i<n*(n-1)/2;i++) {
        if(ans[i] > max)
                max = ans[i];
    }
    cout << max << '\n';
    return ;
}
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    solve();
    return 0;
}


#include <bits/stdc++.h>
#define int long long int
#define MOD 1000000007
using namespace std;
void solve() {
    int n;
    cin >> n;
    vector <int> v;
    for(int i=0;i<n;i++) {
        int x;
        cin >> x;
        v.push_back(x);
    }
    int ans[n*(n-1)/2 + 1] = {0};
    for(int i=0;i<n;i++) {
        for(int j=i+1;j<n;j++) {
                ans[v[i]+v[j]]++;
        }
    }
    int max = 0;
    for(int i=0;i<n*(n-1)/2;i++) {
        if(ans[i] > max)
                max = ans[i];
    }
    cout << max << '\n';
    return ;
}
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 2000005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mx=-inf;
string s;
vector<int> v;
unordered_map<lo,lo> mpp;

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=a[n]+a[n-1];i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(int i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 2000005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mpp[li],mx=-inf;
string s;
vector<int> v;
//~ unordered_map<int,int> mpp

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=a[n]+a[n-1];i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 200005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mx=-inf;
string s;
vector<int> v;
int mpp[li];

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	//~ for(int i=1;i<=n;i++){

	//~ }
	//~ sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=200000;i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 200005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mx=-inf;
string s;
vector<int> v;
int mpp[li];

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	//~ for(int i=1;i<=n;i++){

	//~ }
	//~ sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=200000;i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(a[j]<=i && mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 2000005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mx=-inf;
string s;
vector<int> v;
unordered_map<lo,lo> mpp;

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	//~ sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=200000;i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(int i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 200005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mpp[li],mx=-inf;
string s;
vector<int> v;
//~ unordered_map<int,int> mpp

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=a[n]+a[n-1];i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 2000005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mx=-inf;
string s;
vector<int> v;
unordered_map<lo,lo> mpp;

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	//~ sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=a[n]+a[n-1];i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 2000005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mx=-inf;
string s;
vector<int> v;
map<lo,lo> mpp;

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	//~ sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=200000;i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 2000005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mx=-inf;
string s;
vector<int> v;
map<lo,lo> mpp;

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=a[n]+a[n-1];i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid (bas+son)/2

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 2000005;
const lo mod = 1000000007;

lo n,m,cev,b,a[li],k,mx=-inf,mpp[li];
string s;
vector<int> v;
//~ map<lo,lo> mpp;

int main(){
	scanf("%lld",&n);
	FOR{
		scanf("%lld",&a[i]);
	}
	//~ sort(a+1,a+n+1);
	//~ int bas=0;
	//~ int son=inf;
	for(lo i=1;i<=200000;i++){
		cev=0;
		for(lo j=1;j<=n;j++){
			mpp[a[j]]=1;
		}
		for(lo j=1;j<=n;j++){
			if(mpp[a[j]]==1 && mpp[i-a[j]]==1 && i-a[j]!=a[j]){
				//~ cout<<j<<" "<<i<<endl;
				cev++;
				mpp[a[j]]--;
				mpp[i-a[j]]--;
			}
		}
		//~ cout<<endl;
		mx=max(mx,cev);
	}
	printf("%lld\n",mx);
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <vector>
#include <cstring>
#include <utility>
using namespace std;
typedef long long lint;
typedef pair<int, int> ii;
typedef pair<lint, lint> lii;
typedef pair<int, ii> pii;
#define f(a, b) for(int a = 0; a<b; a++)

int dr[] = { -1, 0, 1, 0 };
int dc[] = { 0, -1, 0, 1 };

int n, m, k;
int ans, cnt;
int arr[1000];
bool is[100001];
int main() {
	cin >> n;
	f(i, n) {
		cin >> arr[i];
		is[arr[i]] = true;
	}
	sort(arr, arr + n);
	int bound = arr[n - 1] + arr[n - 2];

	for (int i = 3; i <= bound; i++) {
		cnt = 0;
		for (int j = 0; j < n; j++) {
			if (i - arr[j] != arr[j] && is[i - arr[j]] && i-arr[j] != 0)
				cnt++;
		}
		cnt /= 2;
		ans = max(ans, cnt);
	}
	cout << ans << '\n';
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <vector>
#include <cstring>
#include <utility>
using namespace std;
typedef long long lint;
typedef pair<int, int> ii;
typedef pair<lint, lint> lii;
typedef pair<int, ii> pii;
#define f(a, b) for(int a = 0; a<b; a++)

int dr[] = { -1, 0, 1, 0 };
int dc[] = { 0, -1, 0, 1 };

int n, m, k;
int ans, cnt;
int arr[1000];
bool is[100001];
int main() {
	cin >> n;
	f(i, n) {
		cin >> arr[i];
		is[arr[i]] = true;
	}
	sort(arr, arr + n);
	int N = n / 2;
	int bound = arr[n - 1] + arr[N+1];

	for (int i = 3; i <= bound; i++) {
		cnt = 0;
		for (int j = 0; j < N; j++) {
			if (i - arr[j] != arr[j] && is[i - arr[j]] && i-arr[j] != 0)
				cnt++;
			if (i - arr[j] <= arr[j]) break;
		}
		//cnt /= 2;
		ans = max(ans, cnt);
	}
	cout << ans << '\n';
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <vector>
#include <cstring>
#include <utility>
using namespace std;
typedef long long lint;
typedef pair<int, int> ii;
typedef pair<lint, lint> lii;
typedef pair<int, ii> pii;
#define f(a, b) for(int a = 0; a<b; a++)

int dr[] = { -1, 0, 1, 0 };
int dc[] = { 0, -1, 0, 1 };

int n, m, k;
int ans, cnt;
int arr[1000];
bool used[100001];
int main() {
	cin >> n;
	f(i, n) {
		cin >> arr[i];
		used[arr[i]] = true;
	}
	sort(arr, arr + n);
	int bound = arr[n - 1] + arr[n - 2];

	for (int i = 3; i <= bound; i++) {
		int N = n % 2 ? n / 2 + 1 : n / 2;
		cnt = 0;
		for (int j = 0; j < N; j++) {
			if (i > arr[j] && i - arr[j] > arr[j] && used[i - arr[j]]) cnt++;
			if (i - arr[j] <= arr[j]) break;
		}
		ans = max(ans, cnt);
	}
	cout << ans << '\n';
	return 0;
}


#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <vector>
#include <cstring>
#include <utility>
using namespace std;
typedef long long lint;
typedef pair<int, int> ii;
typedef pair<lint, lint> lii;
typedef pair<int, ii> pii;
#define f(a, b) for(int a = 0; a<b; a++)

int dr[] = { -1, 0, 1, 0 };
int dc[] = { 0, -1, 0, 1 };

int n, m, k;
int ans, cnt;
int arr[1000];
bool used[100001];
int main() {
	cin >> n;
	f(i, n) {
		cin >> arr[i];
		used[arr[i]] = true;
	}
	sort(arr, arr + n);
	int bound = arr[n - 1] + arr[n - 2];

	for (int i = 3; i <= bound; i++) {
		int N = n / 2;
		cnt = 0;
		for (int j = 0; j < N; j++) {
			if (i > arr[j] && i - arr[j] > arr[j] && used[i - arr[j]]) cnt++;
			if (i - arr[j] <= arr[j]) break;
		}
		ans = max(ans, cnt);
	}
	cout << ans << '\n';
	return 0;
}


#include <iostream>
#include <algorithm>
using namespace std;

int n, arr[200001];
int used[200001];

int main() {
	cin >> n;
	for (int i = 1; i <= n; i++)
		cin >> arr[i];
	int ans = 0;
	for (int i = 1; i <= n; i++)
		for (int j = 1; j < i; j++)
			used[arr[i] + arr[j]]++;

	for (int i = 1; i <= 200000; i++)
		ans = max(ans, used[i]);
	cout << ans << '\n';
	return 0;
}


#include <bits/stdc++.h>
#define maxn 1005
using namespace std;
int ans[30000]={0};
int vis[maxn];
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		scanf("%d",&vis[i]);
	}
	sort(vis,vis+n);
	for(int i=0;i<n-1;i++)
	{
		for(int j=i+1;j<n;j++)
		{
			ans[vis[i]+vis[j]]++;
		}
	}
	int cnt=0;
	for(int i=0;i<=25000;i++)
	{
		cnt=max(cnt,ans[i]);
	}
	printf("%d\n",cnt);
	return 0;
}


#include <bits/stdc++.h>
#define maxn 1005
using namespace std;
int ans[25000]={0};
int vis[maxn];
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		scanf("%d",&vis[i]);
	}
	sort(vis,vis+n);
	for(int i=0;i<n-1;i++)
	{
		for(int j=i+1;j<n;j++)
		{
			ans[vis[i]+vis[j]]++;
		}
	}
	int cnt=0;
	for(int i=0;i<=20001;i++)
	{
		cnt=max(cnt,ans[i]);
	}
	printf("%d\n",cnt);
	return 0;
}


#include <bits/stdc++.h>
#define maxn 105
using namespace std;
struct node
{
	int power;
	int school;
}ans[maxn];
vector<int> v[maxn];
int main()
{
	int n,m,k;
	scanf("%d%d%d",&n,&m,&k);
	for(int i=1;i<=n;i++)
	{
		cin>>ans[i].power ;
	}
	for(int i=1;i<=n;i++)
	{
		cin>>ans[i].school ;
		v[ans[i].school ].push_back(ans[i].power );
	}
	int cnt=0;
	for(int i=0;i<k;i++)
	{
		int a;
		cin>>a;
		int k=ans[a].power ;
		int s=ans[a].school;
		for(int j=0;j<v[s].size();j++)
		{
			if(v[s][j]>k)
			{
				cnt++;
				break;
			}
		}
	}
	cout<<cnt<<endl;
}


#include <bits/stdc++.h>
#define maxn 1005
using namespace std;
int ans[maxn];
int vis[20005]={0};
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		scanf("%d",&ans[i]);
		vis[ans[i]]++;
	}
	int sum=0;
	for(int i=0;i<=20000;i++)
	{
		int cnt=0;
		for(int j=0;j<n;j++)
		{
			if(i<ans[j])
			    continue;
			if(vis[i-ans[j]])
			{
				cnt++;
			}
		}
		sum=max(sum,cnt/2);
	}
	printf("%d\n",sum);
}


#include <bits/stdc++.h>
#define maxn 1005
using namespace std;
int ans[maxn];
int vis[200005]={0};
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		scanf("%d",&ans[i]);
		vis[ans[i]]++;
	}
	int sum=0;
	for(int i=0;i<=20000;i++)
	{
		int cnt=0;
		for(int j=0;j<n;j++)
		{
			if(i<ans[j])
			    continue;
			if(vis[i-ans[j]])
			{
				cnt++;
			}
		}
		sum=max(sum,cnt/2);
	}
	printf("%d\n",sum);
}


#include <bits/stdc++.h>
#define maxn 1005
using namespace std;
int ans[maxn];
int vis[200005]={0};
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		scanf("%d",&ans[i]);
		vis[ans[i]]++;
	}
	int sum=0;
	for(int i=0;i<=200005;i++)
	{
		int cnt=0;
		for(int j=0;j<n;j++)
		{
			if(i<ans[j])
			    continue;
			if(vis[i-ans[j]])
			{
				cnt++;
			}
		}
		sum=max(sum,cnt/2);
	}
	printf("%d\n",sum);
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll ans[20010]={0};
ll vis[1005];
int main()
{
	int n;
	cin>>n;
	for(int i=1;i<=n;i++)
	{
		scanf("%d",&vis[i]);
	}
	sort(vis+1,vis+1+n);
	for(int i=0;i<n-1;i++)
	{
		for(int j=i+1;j<n;j++)
		{
			ans[vis[i]+vis[j]]++;
		}
	}
	ll cnt=0;
	for(int i=0;i<=20000;i++)
	{
		cnt=max(cnt,ans[i]);
	}
	printf("%d\n",cnt);
	return 0;
}


#include <bits/stdc++.h>
#define maxn 1005
using namespace std;
int ans[maxn];
int vis[20005]={0};
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		scanf("%d",&ans[i]);
		vis[ans[i]]++;
	}
	int sum=0;
	for(int i=0;i<=20000;i++)
	{
		int cnt=0;
		for(int j=0;j<n;j++)
		{
			if(vis[i-ans[j]])
			{
				cnt++;
			}
		}
		sum=max(sum,cnt/2);
	}
	printf("%d\n",sum);
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main()
{
     ll n,mx=1;
     cin>>n;
     ll A[10000],B[10000];
     for(ll i=0;i<n;i++)cin>>A[i];
     for(ll i=0;i<n-1;i++)
     {
        for(ll j=i+1;j<n-1;j++)
        {
           B[A[i]+A[j]]++;
           mx=max(mx, B[A[i]+A[j]]);
        }
     }
     cout<<mx;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main()
{
     ll n,mx=0;
     cin>>n;
     ll A[10000],B[10000];
     for(ll i=0;i<n-1;i++)cin>>A[i];
     for(ll i=0;i<n;i++)
     {
        for(ll j=i;j<n;j++)
        {
           B[A[i]+A[j]]++;
           mx=max(mx, B[A[i]+A[j]]);
        }
     }
     cout<<mx;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main()
{
     ll n,mx=0;
     cin>>n;
     ll A[10000],B[10000];
     for(ll i=0;i<n;i++)cin>>A[i];
     for(ll i=0;i<n-1;i++)
     {
        for(ll j=i+1;j<n-1;j++)
        {
           B[A[i]+A[j]]++;
           mx=max(mx, B[A[i]+A[j]]);
        }
     }
     cout<<mx;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll A[10000000],B[10000000];

int main()
{
     ll n,mx=1;
     cin>>n;

     for(ll i=0;i<n;i++)cin>>A[i];
     for(ll i=0;i<n-1;i++)
     {
        for(ll j=i+1;j<n-1;j++)
        {
           B[A[i]+A[j]]++;
           mx=max(mx, B[A[i]+A[j]]);
        }
     }
     cout<<mx;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll A[100000000],B[100000000];

int main()
{
     ll n,mx=1;
     cin>>n;

     for(ll i=0;i<n;i++)cin>>A[i];
     for(ll i=0;i<n-1;i++)
     {
        for(ll j=i+1;j<n-1;j++)
        {
           B[A[i]+A[j]]++;
           mx=max(mx, B[A[i]+A[j]]);
        }
     }
     cout<<mx;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll A[10000000],B[10000000];

int main()
{
     ll n,mx=1;
     cin>>n;

     for(ll i=0;i<n;i++)cin>>A[i];
     for(ll i=0;i<n-1;i++)
     {
        for(ll j=i+1;j<n;j++)
        {
           B[A[i]+A[j]]++;
           mx=max(mx, B[A[i]+A[j]]);
        }
     }
     cout<<mx;
}


#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define ll long long
#define pb push_back
#define mp make_pair
long mod=pow(10,9)+7;
int countdivisors(int n)
{
      ll count =0;
      for(int i=1;i<=sqrt(n);i++)
      {
            if(n%i==0)
            {
                  if(n/i==i)
                  {
                        count++;
                  }else
                  {
                        count=count+2;
                  }
            }
      }
      return count;
}
//to remove dublicate elements from a vector
void remove(std::vector<int> &v)
{
	auto end = v.end();
	for (auto it = v.begin(); it != end; ++it) {
		end = std::remove(it + 1, end, *it);
	}

	v.erase(end, v.end());
}
//to check if a no is perfect square or not
bool isPerfectSquare(int x)
{
    int s = sqrt(x);
    return (s*s == x);
}

// Returns true if n is a Fibonacci Number, else false
bool isFibonacci(int n)
{
    return isPerfectSquare(5*n*n + 4) ||
           isPerfectSquare(5*n*n - 4);
}
int digSum(int n)
{

   int sum=0;
   while(n>0)
   {
         sum+=n%10;
         n=n/10;
   }

    return sum;
}
int main()
{fast
/*freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    //this can be opted out if you want to print the output to the sublime console
    freopen("output.txt", "w", stdout);*/
   int n;
   cin>>n;
   vector<int>a(n);
   //vector<int>v;

   for(int i=0;i<n;i++)
   {
         cin>>a[i];

   }
   sort(a.begin(),a.end());
   int m[2*pow(10,5)+1]={};
   for(int i=0;i<n;i++)
   {
         for(int j=i+1;j<n;j++)
         {
              int x=a[i]+a[j];
              m[x]++;
         }
   }

   int max=INT_MIN;
   for(int i=0;i<2*pow(10,5)+1;i++)
   {
         if(m[i]>max)
         {
               max=m[i];
         }
   }
cout<<max;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define ll long long
#define pb push_back
#define mp make_pair
long mod=pow(10,9)+7;
int countdivisors(int n)
{
      ll count =0;
      for(int i=1;i<=sqrt(n);i++)
      {
            if(n%i==0)
            {
                  if(n/i==i)
                  {
                        count++;
                  }else
                  {
                        count=count+2;
                  }
            }
      }
      return count;
}
//to remove dublicate elements from a vector
void remove(std::vector<int> &v)
{
	auto end = v.end();
	for (auto it = v.begin(); it != end; ++it) {
		end = std::remove(it + 1, end, *it);
	}

	v.erase(end, v.end());
}
//to check if a no is perfect square or not
bool isPerfectSquare(int x)
{
    int s = sqrt(x);
    return (s*s == x);
}

// Returns true if n is a Fibonacci Number, else false
bool isFibonacci(int n)
{
    return isPerfectSquare(5*n*n + 4) ||
           isPerfectSquare(5*n*n - 4);
}
int digSum(int n)
{

   int sum=0;
   while(n>0)
   {
         sum+=n%10;
         n=n/10;
   }

    return sum;
}
int main()
{fast
/*freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    //this can be opted out if you want to print the output to the sublime console
    freopen("output.txt", "w", stdout);*/
   int n;
   cin>>n;
   vector<int>a(n);
   //vector<int>v;

   for(int i=0;i<n;i++)
   {
         cin>>a[i];

   }
   int s=(pow(10,5)*2)+1;
   sort(a.begin(),a.end());
   int m[s]={};
   for(int i=0;i<n;i++)
   {
         for(int j=i+1;j<n;j++)
         {
              int x=a[i]+a[j];
              m[x]++;
         }
   }

   int max=INT_MIN;
   for(int i=0;i<s;i++)
   {
         if(m[i]>max)
         {
               max=m[i];
         }
   }
cout<<max;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define ll long long
#define pb push_back
#define mp make_pair
long mod=pow(10,9)+7;
int countdivisors(int n)
{
      ll count =0;
      for(int i=1;i<=sqrt(n);i++)
      {
            if(n%i==0)
            {
                  if(n/i==i)
                  {
                        count++;
                  }else
                  {
                        count=count+2;
                  }
            }
      }
      return count;
}
//to remove dublicate elements from a vector
void remove(std::vector<int> &v)
{
	auto end = v.end();
	for (auto it = v.begin(); it != end; ++it) {
		end = std::remove(it + 1, end, *it);
	}

	v.erase(end, v.end());
}
//to check if a no is perfect square or not
bool isPerfectSquare(int x)
{
    int s = sqrt(x);
    return (s*s == x);
}

// Returns true if n is a Fibonacci Number, else false
bool isFibonacci(int n)
{
    return isPerfectSquare(5*n*n + 4) ||
           isPerfectSquare(5*n*n - 4);
}
int digSum(int n)
{

   int sum=0;
   while(n>0)
   {
         sum+=n%10;
         n=n/10;
   }

    return sum;
}
int main()
{fast
/*freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    //this can be opted out if you want to print the output to the sublime console
    freopen("output.txt", "w", stdout);*/
   int n;
   cin>>n;
   vector<int>a(n);
   //vector<int>v;

   for(int i=0;i<n;i++)
   {
         cin>>a[i];

   }
   int s=(pow(10,5)*2)+1;
   sort(a.begin(),a.end());
   int m[s]={};
   for(int i=0;i<n;i++)
   {
         for(int j=i+1;j<n;j++)
         {
              int x=a[i]+a[j];
              m[x]++;
         }
   }

   int max=INT_MIN;
   for(int i=0;i<=s;i++)
   {
         if(m[i]>max)
         {
               max=m[i];
         }
   }
cout<<max;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define ll long long
#define pb push_back
#define mp make_pair
long mod=pow(10,9)+7;
int countdivisors(int n)
{
      ll count =0;
      for(int i=1;i<=sqrt(n);i++)
      {
            if(n%i==0)
            {
                  if(n/i==i)
                  {
                        count++;
                  }else
                  {
                        count=count+2;
                  }
            }
      }
      return count;
}
//to remove dublicate elements from a vector
void remove(std::vector<int> &v)
{
	auto end = v.end();
	for (auto it = v.begin(); it != end; ++it) {
		end = std::remove(it + 1, end, *it);
	}

	v.erase(end, v.end());
}
//to check if a no is perfect square or not
bool isPerfectSquare(int x)
{
    int s = sqrt(x);
    return (s*s == x);
}

// Returns true if n is a Fibonacci Number, else false
bool isFibonacci(int n)
{
    return isPerfectSquare(5*n*n + 4) ||
           isPerfectSquare(5*n*n - 4);
}
int digSum(int n)
{

   int sum=0;
   while(n>0)
   {
         sum+=n%10;
         n=n/10;
   }

    return sum;
}
int main()
{fast
/*freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    //this can be opted out if you want to print the output to the sublime console
    freopen("output.txt", "w", stdout);*/
   int n;
   cin>>n;
   vector<int>a(n);
   vector<int>v;

   for(int i=0;i<n;i++)
   {
         cin>>a[i];

   }
   sort(a.begin(),a.end());
   int m[a[0]+a[n-1]+1]={};
   for(int i=0;i<n;i++)
   {
         for(int j=i+1;j<n;j++)
         {
              int x=a[i]+a[j];
              m[x]++;
         }
   }

   int max=INT_MIN;
   for(int i=0;i<=(a[0]+a[n-1]);i++)
   {
         if(m[i]>max)
         {
               max=m[i];
         }
   }
cout<<max;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
int
main ()
{
  int n, k = 0;
  cin >> n;
  int a[n], sum[n * n];
  for (int i = 0; i < n; i++)
    cin >> a[i];
  sort (a, a + n);
  for (int i = 0; i < n; i++)
    {
      for (int j = i + 1; j < n; j++)
	{
	  sum[k] = a[i] + a[j];

	  k++;
	}
    }
  sort (sum, sum + k);
  sum[k] = 0;
  int d = 0, max = 0;
  for (int i = 0; i < k; i++)
    {

      if (sum[i] < sum[i + 1])
	{
	  max = (max > (i - d + 1)) ? max : (i - d + 1);
	  d = i + 1;
	}
    }

  cout << max;
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,k=0;
cin>>n;
int a[n],sum[n*n];
for(int i=0;i<n;i++)
cin>>a[i];
sort(a,a+n);
for(int i=0;i<n;i++)
{
for(int j=i+1;j<n;j++)
{
sum[k]=a[i]+a[j];
k++;
}
}
sort(sum,sum+k);
int d=0,max=0;
for(int i=0;i<k;i++)
{
if(sum[i]<sum[i+1])
{
max=(max>(i-d+1))?max:(i-d+1);
d=i+1;
}
}
cout<<max;
return 0;
}


#include<bits/stdc++.h>
using namespace std;
int
main ()
{
  int n, k = 0;
  cin >> n;
  int a[n], sum[n * n+1];
  for (int i = 0; i < n; i++)
    cin >> a[i];
  sort (a, a + n);
  for (int i = 0; i < n-1; i++)
    {
      for (int j = i + 1; j < n; j++)
	{
	  sum[k] = a[i] + a[j];

	  k++;
	}
    }
  sort (sum, sum + k);
  sum[k] = 0;
  int d = 0, max = 0;
  if(k==1)
  cout<<"1";
  else
  {
  for (int i = 0; i < k; i++)
    {

      if (sum[i] < sum[i + 1])
	{
	  max = (max >= (i - d + 1)) ? max : (i - d + 1);
	  d = i + 1;
	}
    }

  cout << max;
  }
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
int
main ()
{
  int n, k = 0;
  cin >> n;
  int a[n], sum[n * n+1];
  for (int i = 0; i < n; i++)
    cin >> a[i];
  sort (a, a + n);
  for (int i = 0; i < n-1; i++)
    {
      for (int j = i + 1; j < n; j++)
	{
	  sum[k] = a[i] + a[j];

	  k++;
	}
    }
  sort (sum, sum + k);
  sum[k] = 0;
  int d = 0, max = 0;
  if(k=1)
  cout<<"1";
  else
  {
  for (int i = 0; i < k; i++)
    {

      if (sum[i] < sum[i + 1])
	{
	  max = (max >= (i - d + 1)) ? max : (i - d + 1);
	  cout<<max;
	  d = i + 1;
	}
    }

  cout << max;
  }
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
int
main ()
{
  int n, k = 0;
  cin >> n;
  int a[n], sum[n * n+1];
  for (int i = 0; i < n; i++)
    cin >> a[i];
  sort (a, a + n);
  for (int i = 0; i < n-1; i++)
    {
      for (int j = i + 1; j < n; j++)
	{
	  sum[k] = a[i] + a[j];

	  k++;
	}
    }
  sort (sum, sum + k);
  sum[k] = 0;
  int d = 0, max = 0;
  if(k==1)
  cout<<"1";
  else
  {
  for (int i = 0; i < k; i++)
    {

      if (sum[i] < sum[i + 1])
	{
	  max = (max >= (i - d + 1)) ? max : (i - d + 1);
	  cout<<max;
	  d = i + 1;
	}
    }

  cout << max;
  }
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
int
main ()
{
  int n, k = 0;
  cin >> n;
  int a[n], sum[n * n+1];
  for (int i = 0; i < n; i++)
    cin >> a[i];
  sort (a, a + n);
  for (int i = 0; i < n-1; i++)
    {
      for (int j = i + 1; j < n; j++)
	{
	  sum[k] = a[i] + a[j];

	  k++;
	}
    }
  sort (sum, sum + k);
  sum[k] = 0;
  int d = 0, max = 0;
  if(k=1)
  cout<<"1";
  else
  {
  for (int i = 0; i < k; i++)
    {

      if (sum[i] < sum[i + 1])
	{
	  max = (max >= (i - d + 1)) ? max : (i - d + 1);
	  d = i + 1;
	}
    }

  cout << max;
  }
  return 0;
}


#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define re return
#define ll long long
#define ull unsigned ll
#define ld long double
#define f first
#define s second
#define pi acos(-1)
#define oo (ll)1e9+5
#define OO 1e18
#define EPS 1e-6
#define Endl '\n'
#define FX(n) fixed<<setprecision(n)
#define mm(o,k) memset(o,k,sizeof o)
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
const int maxn=200005;
int cnt[maxn];
int main()
{
    IO;
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i=0;i<n;++i)
        cin >> a[i];
    sort(a.begin(),a.end());
    set<int> hna;
    for(int i=0;i<n;++i)
        for(int j=i+1;j<n;++j)
            hna.insert(a[j]-a[i]);
    vector<int> m3lsh;
    for(auto i:hna)m3lsh.push_back(i);
    int Max=0;
    for(auto dif:m3lsh){
        mm(cnt,0);
        for(int i=0;i<n;++i)
            cnt[a[i]]++;
        int ans=0;
        for(int i=0;i<n;++i){
            if(!cnt[a[i]])continue;
            cnt[a[i]]--;
            if(cnt[dif+a[i]])--cnt[dif+a[i]],++ans;
            else cnt[a[i]]++;
        }
        Max=max(Max,ans);
    }
    cout<<Max<<endl;
    re 0;
}


#include <iostream>
#include <math.h>
#include <bits/stdc++.h>
#include <map>
#include <vector>
#include <deque>
#define ll long long int
using namespace std;

int main(){

//	ios::sync_with_stdio(false);
//	cin.tie(nullptr);
	ll m;
	cin>>m;
	vector<double>vectorr;
	unordered_map<double,ll>mapa;
	for(ll i=0;i<m;i++){
	char x1,x2,x3,x4;
	double x;
	int a,b,c;
	cin>>x1;

	cin>>a;
	cin>>x2>>b>>x3>>x4>>c;
	x=(a+b)/c;
	mapa[x]++;
	vectorr.push_back(x);
	}

	for(ll i=0;i<vectorr.size();i++){
		cout<<mapa[vectorr[i]]<<" ";
		}

}


#include<bits/stdc++.h>
#define rep(i, a, b) for(int i = (a); i < (b); i++)
#define PB emplace_back
#define MINI -2147483648
#define MAXI 2147483647
#define MAXLL 9223372036854775807LL
#define MINLL -9223372036854775808LL
#define pii pair<int, int>
#define pll pair<long long, long long>
#define F first
#define S second
#define mp make_pair
//#define majestic_Remilia
#define lowerBit(x) x&-x
#define int long long
#define double long double
using LL = long long;
using ULL = unsigned long long;
using namespace std;

int m;
map<double, int> ma;
vector<double> vec;

double parse(string &s) {
  double a = 0, b = 0, c = 0;
  int pos = 0;
  while(s[++pos] != '+') a = 10 * a + (s[pos] - '0');
  while(s[++pos] != ')') b = 10 * b + (s[pos] - '0');
  pos++;
  while(++pos != s.size()) c = 10 * c + (s[pos] - '0');

  return (a + b) / c;
}

signed main () {
  ios::sync_with_stdio(false), cin.tie(NULL);

  #ifdef majestic_Remilia
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif

  cin >> m;
  rep(i, 0, m) {
    string s; cin >> s;
    double val = parse(s);
    //cout << val << '\n';
    vec.PB(val);

    if (!ma.count(val)) ma[val] = 1;
    else ma[val]++;
  }

  for(double X : vec) {
    cout << ma[X] << ' ';
  }
  cout << '\n';

  return 0;
}


#include<bits/stdc++.h>
#define rep(i, a, b) for(int i = (a); i < (b); i++)
#define PB emplace_back
#define MINI -2147483648
#define MAXI 2147483647
#define MAXLL 9223372036854775807LL
#define MINLL -9223372036854775808LL
#define pii pair<int, int>
#define pll pair<long long, long long>
#define F first
#define S second
#define mp make_pair
//#define majestic_Remilia
#define lowerBit(x) x&-x
#define int long long
#define double int
using LL = long long;
using ULL = unsigned long long;
using namespace std;

int m;
map<double, int> ma;
vector<double> vec;

double parse(string &s) {
  int a = 0, b = 0, c = 0;
  int pos = 0;
  while(s[++pos] != '+') a = 10 * a + (s[pos] - '0');
  while(s[++pos] != ')') b = 10 * b + (s[pos] - '0');
  pos++;
  while(++pos != s.size()) c = 10 * c + (s[pos] - '0');

  return (a + b) / c;
}

signed main () {
  ios::sync_with_stdio(false), cin.tie(NULL);

  #ifdef majestic_Remilia
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif

  cin >> m;
  rep(i, 0, m) {
    string s; cin >> s;
    double val = parse(s);
    vec.PB(val);

    if (!ma.count(val)) ma[val] = 0;
    ma[val]++;
  }

  for(int X : vec) {
    cout << ma[X] << ' ';
  }
  cout << '\n';

  return 0;
}


#include<bits/stdc++.h>
#define rep(i, a, b) for(int i = (a); i < (b); i++)
#define PB emplace_back
#define MINI -2147483648
#define MAXI 2147483647
#define MAXLL 9223372036854775807LL
#define MINLL -9223372036854775808LL
#define pii pair<int, int>
#define pll pair<long long, long long>
#define F first
#define S second
#define mp make_pair
//#define majestic_Remilia
#define lowerBit(x) x&-x
#define int long long
#define double long double
using LL = long long;
using ULL = unsigned long long;
using namespace std;

int m;
map<double, int> ma;
vector<double> vec;

double parse(string &s) {
  int a = 0, b = 0, c = 0;
  int pos = 0;
  while(s[++pos] != '+') a = 10 * a + (s[pos] - '0');
  while(s[++pos] != ')') b = 10 * b + (s[pos] - '0');
  pos++;
  while(++pos != s.size()) c = 10 * c + (s[pos] - '0');

  return (a + b) / c;
}

signed main () {
  ios::sync_with_stdio(false), cin.tie(NULL);

  #ifdef majestic_Remilia
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif

  cin >> m;
  rep(i, 0, m) {
    string s; cin >> s;
    double val = parse(s);
    vec.PB(val);

    if (!ma.count(val)) ma[val] = 0;
    ma[val]++;
  }

  for(int X : vec) {
    cout << ma[X] << ' ';
  }
  cout << '\n';

  return 0;
}


//move on rick
#include<bits/stdc++.h>
using namespace std;
#define    ll    long long int
/*freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);*/
double m[200001];
map<double,int> k;
int n,a,b,c,i;
int main()
{
	scanf("%d\n",&n);
	for(i=1;i<=n;++i)
	{
		scanf("(%d+%d)/%d\n",&a,&b,&c);

		m[i]=(double)(a+b)/c;
		++k[m[i]];
	}
	for( i=1;i<=n;++i)
		printf("%d ",k[m[i]]);
}


//move on rick
#include<bits/stdc++.h>
using namespace std;
#define    ll    long long int
/*freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);*/
ll m,n,c,d,j,k,l,r,x,t,y,u,b,z,i,e,f,g,h,o;
int main ()
{
cin>>t;char ch,ck,cp,cl;
while(t--){
    cin>>ch>>n>>ck>>m>>cp>>cl>>o;
    c=(n+m)/o;
    if(c==0) c=2;
    cout<<c-1<<endl;
}
}


//move on rick
#include<bits/stdc++.h>
using namespace std;
#define    ll    long long int
/*freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);*/
ll m,n,c,d,j,k,l,r,x,t,y,u,b,z,i,e,f,g,h,o;
int main ()
{
cin>>t;char ch,ck,cp,cl;
while(t--){
    cin>>ch>>n>>ck>>m>>cp>>cl>>o;
    c=(n+m)/o;
    if(c==0) c=1;
    cout<<c-1<<endl;
}
}


/************************************ PALESTINE *****************************************
 Suhaib     ________   |     |   |     |        /\      _______    _______   صهيب صوالحه
            |          |     |   |     |       /  \        |       |     |
            |_______   |     |   |_____|      /____\       |       |_____)
                    |  |     |   |     |     /      \      |       |     )
            ________|  \_____/   |     |    /        \   __|___    |_____|   Sawalha
************************************* PALESTINE ****************************************/

#include <bits/stdc++.h>
//#include "TheReality.h"
//#include "People.h"

using namespace std;

#define In_The_Name_Of_Allah_The_Merciful ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define Alhamdulillah return 0;

typedef long long ll;

#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define out(n) cout << n << endl

#define Frein freopen("input.in", "r", stdin);
#define Freout freopen("output.in", "w", stdout);

#define loop(i,k,n) for (ll i = k ; i < n ; ++i)
#define co_co(v) copy(v.begin(),v.end(),ostream_iterator<ll>(cout , " "))
#define for_cin(v) for(auto &x:v) cin >> x;
#define sor(v) sort (v.begin(),v.end())
#define sorv(v) sort (v.rbegin(),v.rend())
#define rev(v) reverse (v.begin(),v.end())
#define wh(n) while (n--)
#define debug(n) cout << '[' << #n << " = " << n << "]" << endl;

void Suhaib_Sawalha (){

map <long double,ll> time;
ll t;
cin >> t;
long double arr[t];

loop(i,0,t){

    ll n , m , k;
    char c;
    cin >> c >> n >> c >> m >> c >> c >> k;
    time[1.0*(n+m)/k]++;
    arr[i] = 1.0*(n+m)/k;
}

loop(i,0,t)
    cout << time[arr[i]] << " ";

}

void Suhaib_Sawalha1 (){
ll t;
cin >> t;
wh(t) {Suhaib_Sawalha();}
}

int main(){
                                In_The_Name_Of_Allah_The_Merciful   /* بسم الله الرحمن الرحيم  */
Suhaib_Sawalha();
                                         Alhamdulillah                    /* الحمد لله */
}


#include <bits/stdc++.h> /* author : Suhaib Sawalha */
int main(){std::map<long double,long long>time;long long t;scanf("%lld",&t);long double arr[t];for(long long i=0;i<t;++i){long long n,m,k;char c;scanf("%c %lld %c %lld %c %c %lld",&c,&n,&c,&m,&c,&c,&k);time[1.0*(n+m)/k]++;arr[i] = 1.0*(n+m)/k;}for(long long i=0;i<t;++i)printf("%lld ",time[arr[i]]);}


#include <cstdio>
#include <cctype>

using namespace std;
int v[2000005];
int f[2000005];
char s[200];
int calc (char s[])
{
    int num=0,sum=0,pos=0;
    for(int i=1;s[i];++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
        else
        {
            sum+=num;
            num=0;
            if(s[i]==')')
            {
                pos=i;
                break;
            }
        }
    }
    num=0;
    for(int i=pos+1;s[i];++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
    }
    return sum/num;
}
int main()
{
    int n;
    scanf("%d\n",&n);
    for(int i=1;i<=n;++i)
    {
        gets(s);
        v[i]=calc(s);
        f[calc(s)]++;
    }
    for(int i=1;i<=n;++i)
        printf("%d ",f[v[i]]);
    return 0;
}


#include <cstdio>
#include <cctype>
#include <algorithm>
#include <cstring>

using namespace std;

int f[200][200];
char s[2000000];
int lim;
struct gigel
{
    int sum,num;
};
gigel v[2000005];
gigel calc (char s[])
{
    int num=0,sum=0,pos=0;
    for(int i=1;i<=lim;++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
        else
        {
            sum+=num;
            num=0;
            if(s[i]==')')
            {
                pos=i;
                break;
            }
        }
    }
    num=0;
    for(int i=pos+1;i<=lim;++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
    }
    int gcd=__gcd(sum,num);
    sum/=gcd;
    num/=gcd;
    f[sum][num]++;
    gigel aux;
    aux.sum=sum;
    aux.num=num;
    return aux;
}
int main()
{
    int n;
    scanf("%d\n",&n);
    for(int i=1;i<=n;++i)
    {
        gets(s);
        lim=strlen(s);
        v[i]=calc(s);
    }
    for(int i=1;i<=n;++i)
        printf("%d ",f[v[i].sum][v[i].num]);
    return 0;
}


#include <cstdio>
#include <cctype>
#include <cstring>

using namespace std;
int v[2000005];
int f[2000005];
char s[200];
int lim;
int calc (char s[])
{
    int num=0,sum=0,pos=0;
    for(int i=1;i<=lim;++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
        else
        {
            sum+=num;
            num=0;
            if(s[i]==')')
            {
                pos=i;
                break;
            }
        }
    }
    num=0;
    for(int i=pos+1;i<=lim;++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
    }
    return sum/num;
}
int main()
{
    int n;
    scanf("%d\n",&n);
    for(int i=1;i<=n;++i)
    {
        gets(s);
        lim=strlen(s);
        v[i]=calc(s);
        f[calc(s)]++;
    }
    for(int i=1;i<=n;++i)
        printf("%d ",f[v[i]]);
    return 0;
}


#include <cstdio>
#include <cctype>
#include <cstring>

using namespace std;
int v[2000005];
int f[2000005];
char s[2000000];
int lim;
int calc (char s[])
{
    int num=0,sum=0,pos=0;
    for(int i=1;i<=lim;++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
        else
        {
            sum+=num;
            num=0;
            if(s[i]==')')
            {
                pos=i;
                break;
            }
        }
    }
    num=0;
    for(int i=pos+1;i<=lim;++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
    }
    return sum/num;
}
int main()
{
    int n;
    scanf("%d\n",&n);
    for(int i=1;i<=n;++i)
    {
        gets(s);
        lim=strlen(s);
        v[i]=calc(s);
        f[calc(s)]++;
    }
    for(int i=1;i<=n;++i)
        printf("%d ",f[v[i]]);
    return 0;
}


#include <cstdio>
#include <cctype>
#include <cstring>

using namespace std;
int v[2000005];
int f[2000005];
char s[200];
int lim;
int calc (char s[])
{
    int num=0,sum=0,pos=0;
    for(int i=1;i<lim;++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
        else
        {
            sum+=num;
            num=0;
            if(s[i]==')')
            {
                pos=i;
                break;
            }
        }
    }
    num=0;
    for(int i=pos+1;i<lim;++i)
    {
        if(isdigit(s[i]))
        {
            num=num*10+s[i]-'0';
        }
    }
    return sum/num;
}
int main()
{
    int n;
    scanf("%d\n",&n);
    for(int i=1;i<=n;++i)
    {
        gets(s);
        lim=strlen(s);
        v[i]=calc(s);
        f[calc(s)]++;
    }
    for(int i=1;i<=n;++i)
        printf("%d ",f[v[i]]);
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define f first
#define s second
#define ii pair<int,int>
#define vi vector<int>
#define vl vector<ll>
#define forn(i,n) for(int i=0;i<n;i++)
#define rforn(i,n) for(int i=n-1;i>=0;i--)
#define forne(i,n) for(int i=1;i<=n;i++)
#define rforne(i,n) for(int i=n;i>=1;i--)
#define forse(i,s,e) for(int i=s;i<e;i++)
#define rforse(i,s,e) for(int i=e-1;i>=s;i--)
#define all(x) x.begin(),x.end()
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front

ll N = 1e9+7;

void solve(){
	int n; cin>>n;
	map<ii,int> mp;
	vector<ii> v(n+4);
	forn(i,n){
		string s,a,b,c; cin>>s;
		if(s[2]=='+'){
			a=s.substr(1,1);
			if(s[4]==')'){
				b=s.substr(3,1);
				c=s.substr(6,s.size()-6);
			}
			else{
				b=s.substr(3,2);
				c=s.substr(7,s.size()-7);
			}
		}
		else{
			a=s.substr(1,2);
			if(s[5]==')'){
				b=s.substr(4,1);
				c=s.substr(7,s.size()-7);
			}
			else{
				b=s.substr(4,2);
				c=s.substr(8,s.size()-8);
			}
		}
		//cout<<a<<" "<<b<<" "<<c<<endl;
		int a1=0,b1=0,c1=0;
		if(a.size()==1){
			a1=a[0]-'0';
		}
		else{
			a1=a[1]-'0';
			a1 += 10*(a[0]-'0');
		}
		if(b.size() == 1){
			b1=b[0]-'0';
		}
		else{
			b1=b[1]-'0';
			b1 += 10*(b[0]-'0');
		}
		if(c.size() == 1){
			c1=c[0]-'0';
		}
		else{
			c1=c[1]-'0';
			c1 += 10*(c[0]-'0');
		}
		//cout<<a1<<" "<<b1<<" "<<c1<<endl;
		int gcd1=__gcd(a1+b1,c1);
		v[i]={(a1+b1)/gcd1,c1/gcd1};
		mp[v[i]]++;
	}
	for(int i=0;i<n;i++){
		cout<<mp[v[i]]<<" ";
	}
	cout<<endl;
}
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int t=1;
	//cin>>t;
	while(t--){
		solve();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define f first
#define s second
#define ii pair<int,int>
#define vi vector<int>
#define vl vector<ll>
#define forn(i,n) for(int i=0;i<n;i++)
#define rforn(i,n) for(int i=n-1;i>=0;i--)
#define forne(i,n) for(int i=1;i<=n;i++)
#define rforne(i,n) for(int i=n;i>=1;i--)
#define forse(i,s,e) for(int i=s;i<e;i++)
#define rforse(i,s,e) for(int i=e-1;i>=s;i--)
#define all(x) x.begin(),x.end()
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front

ll N = 1e9+7;

void solve(){
	int n; cin>>n;
	map<ii,int> mp;
	vector<ii> v(n+4);
	forn(i,n){
		string s,a,b,c; cin>>s;
		if(s[2]=='+'){
			a=s.substr(1,1);
			if(s[4]==')'){
				b=s.substr(3,1);
				c=s.substr(6,s.size()-6);
			}
			else{
				b=s.substr(3,2);
				c=s.substr(7,s.size()-7);
			}
		}
		else{
			a=s.substr(1,2);
			if(s[5]==')'){
				b=s.substr(4,1);
				c=s.substr(7,s.size()-7);
			}
			else{
				b=s.substr(4,2);
				c=s.substr(8,s.size()-8);
			}
		}
		//cout<<a<<" "<<b<<" "<<c<<endl;
		int a1=0,b1=0,c1=0;
		if(a.size()==1){
			b1=b[0]-'0';
		}
		else{
			a1=a[1]-'0';
			a1 += 10*(a[0]-'0');
		}
		if(b.size() == 1){
			b1=b[0]-'0';
		}
		else{
			b1=b[1]-'0';
			b1 += 10*(b[0]-'0');
		}
		if(c.size() == 1){
			c1=c[0]-'0';
		}
		else{
			c1=c[1]-'0';
			c1 += 10*(c[0]-'0');
		}
		//cout<<a1<<" "<<b1<<" "<<c1<<endl;
		int gcd1=__gcd(a1+b1,c1);
		v[i]={(a1+b1)/gcd1,c1/gcd1};
		mp[v[i]]++;
	}
	for(int i=0;i<n;i++){
		cout<<mp[v[i]]<<" ";
	}
	cout<<endl;
}
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int t=1;
	//cin>>t;
	while(t--){
		solve();
	}
}


#include<iostream>
#include<sstream>
#include<vector>
#include<map>
#include<algorithm>
#include<cstring>
#include<stack>
#include<math.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    vector <double> v;
    for(int i=0; i<n; i++){
        string s;
        cin>>s;
        double a,b,c;
        string p = "";
        for(int j=0; j<s.size(); j++){
            if(s[j] == '('){
                j++;
                while(s[j] != '+'){
                    p=p+s[j];
                    j++;
                }
                stringstream ss;
                ss << p;
                ss >> a;
                p = "";
            }
            if(s[j] == '+'){
                j++;
                while(s[j] != ')'){
                    p=p+s[j];
                    j++;
                }
                stringstream ss;
                ss << p;
                ss >> b;
                p = "";
            }
            if(s[j] == '/'){
                j++;
                while(j<s.size()){
                    p=p+s[j];
                    j++;
                }
                stringstream ss;
                ss << p;
                ss >> c;
                p = "";
            }
        }
        v.push_back(double((a+b)/c));
    }
    map<double,int> m;
    for(int i=0; i<v.size(); i++){
        m[v[i]]++;
    }
    for(int i=0; i<n; i++){
        cout<<m[v[i]]<<" ";
    }
    return 0;
}


#include<iostream>
#include<sstream>
#include<vector>
#include<map>
#include<algorithm>
#include<cstring>
#include<stack>
#include<math.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    vector <int> v;
    for(int i=0; i<n; i++){
        string s;
        cin>>s;
        int a,b,c;
        string p = "";
        for(int j=0; j<s.size(); j++){
            if(s[j] == '('){
                j++;
                while(s[j] != '+'){
                    p=p+s[j];
                    j++;
                }
                stringstream ss;
                ss << p;
                ss >> a;
                p = "";
            }
            if(s[j] == '+'){
                j++;
                while(s[j] != ')'){
                    p=p+s[j];
                    j++;
                }
                stringstream ss;
                ss << p;
                ss >> b;
                p = "";
            }
            if(s[j] == '/'){
                j++;
                while(j<s.size()){
                    p=p+s[j];
                    j++;
                }
                stringstream ss;
                ss << p;
                ss >> c;
                p = "";
            }
        }
        v.push_back((a+b)/c);
    }
    map<int,int> m;
    for(int i=0; i<v.size(); i++){
        m[v[i]]++;
    }
    for(int i=0; i<n; i++){
        cout<<m[v[i]]<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	#endif
	ios::sync_with_stdio(false);
    cin.tie(0);

    int n;cin>>n;
    map<int,int> m;
    vector<int> v;
	while(n--){
		char ch;
		int a,b,c;
		cin>>ch>>a>>ch>>b>>ch>>ch>>c;
		m[(a+b)/c]++;
		v.push_back((a+b)/c);
	}
	for(auto x:v)cout<<m[x]<<" ";

    #ifndef ONLINE_JUDGE
    	cout << "\nTime Elapsed : " << 1.0 * clock() << " ms\n";
    #endif
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	#endif
	ios::sync_with_stdio(false);
    cin.tie(0);

    int n;cin>>n;
    map<double,int> m;
    vector<double> v;
	while(n--){
		char ch;
		double a,b,c;
		cin>>ch>>a>>ch>>b>>ch>>ch>>c;
		m[(a+b)/c]++;
		v.push_back((a+b)/c);
	}
	for(auto x:v)cout<<m[x]<<" ";

    #ifndef ONLINE_JUDGE
    	cout << "\nTime Elapsed : " << 1.0 * clock() << " ms\n";
    #endif
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	#endif
	ios::sync_with_stdio(false);
    cin.tie(0);

    int n;cin>>n;
    map<double,int> m;
    vector<double> v;
	while(n--){
		char ch;
		int a,b,c;
		cin>>ch>>a>>ch>>b>>ch>>ch>>c;
		m[(a+b)/c]++;
		v.push_back((a+b)/c);
	}
	for(auto x:v)cout<<m[x]<<" ";

    #ifndef ONLINE_JUDGE
    	cout << "\nTime Elapsed : " << 1.0 * clock() << " ms\n";
    #endif
	return 0;
}


/*
    author: Salam_35
    Created at :

*/

#include <bits/stdc++.h>
using namespace std;

/*        speed up       */
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

#define ll long long int
#define pb push_back
#define sc(n) scanf("%d",&n)
#define Max 100005
#define scan(n) scanf("%lld",&n)
#define pi acos(-1.0)
#define _fastio  ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ALL(x) x.begin(),x.end()
#define sci(n) scanf("%d",&n);
#define scl(n) scanf("%lld",&n);
#define load(array,size)  for(ll i=0 ; i<size ; i++) cin>>array[i] ;
#define load1(array,size)  for(ll i=1 ; i<=size ; i++) cin>>array[i] ;
#define INF    1LL<<19
#define pll pair<ll,ll>
#define mst(arr,value) memset(arr,value,sizeof(arr));
#define tst() _fastio;int testsalam;cin >> testsalam;while(testsalam--)
#define Mod 100000007
#define YES cout<<"Yes"<<endl;
#define NO cout<<"No"<<endl;
#define endl '\n'
//void inversemod(ll n, ll mod, ll invmod[],ll MOD){for(int i=2; i<=n; ++i) invmod[i]=MOD-MOD/i*invmod[MOD%i]%MOD;}
//void bigmod( ll a, ll b ,ll mod){ll r = 1;a = a%mod;while(b){if( b%2 ) r = (r*a)%mod;b = b/2;a = (a*a)%mod; }return (ll)r;}
string inttostr(ll n){std::stringstream ss;ss << n;string out=ss.str();return out;}
ll stringtoint(string s){istringstream iss (s);ll n;iss >> n;return n;}
template <typename T> T gcd(T a,T b){if(a < 0)return gcd(-a,b);if(b < 0)return gcd(a,-b);return (b == 0)?a:gcd(b,a%b);}
template <typename T> T lcm(T a,T b) {if(a < 0)return lcm(-a,b);if(b < 0)return lcm(a,-b);return a*(b/gcd(a,b));}
typedef vector<ll>vec;
typedef pair<ll,ll> pii;
typedef map<ll,ll>mpll;
typedef set<ll>seet;

int main()
{
	mpll mp;
	vec r;
    tst()
    {
    	string s;
    	cin >> s;
    	string a="",b="",c="";
    	int i=0;
    	for ( i = 0; s[i]!='+'; ++i)
    	{
    		if(isdigit(s[i]))
    			a+=s[i];
    	}
    	for ( ; s[i]!=')'; ++i)
    	{
    		if(isdigit(s[i]))
    			b+=s[i];
    	}
    	for (; i<s.size(); ++i)
    	{
    		if(isdigit(s[i]))
    			c+=s[i];
    	}
    	ll aa=(double)stringtoint(a);
    	ll bb=(double)stringtoint(b);
    	ll cc=(double)stringtoint(c);

    	ll d=(aa+bb)/cc;
    	// cout<<(aa+bb)/cc<<' '<<d<<' ';
    	mp[d]++;
    	r.push_back(d);
    	// cout<<r.back()<<endl;
    }
    for(ll x:r)cout<<mp[x]<<' ';cout<<endl;
}
/*
 		remember:
 		ll vs int
 		array size
 		case for 1 2 3
*/


/*
    author: Salam_35
    Created at :

*/

#include <bits/stdc++.h>
using namespace std;

/*        speed up       */
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

#define ll long long int
#define pb push_back
#define sc(n) scanf("%d",&n)
#define Max 100005
#define scan(n) scanf("%lld",&n)
#define pi acos(-1.0)
#define _fastio  ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ALL(x) x.begin(),x.end()
#define sci(n) scanf("%d",&n);
#define scl(n) scanf("%lld",&n);
#define load(array,size)  for(ll i=0 ; i<size ; i++) cin>>array[i] ;
#define load1(array,size)  for(ll i=1 ; i<=size ; i++) cin>>array[i] ;
#define INF    1LL<<19
#define pll pair<ll,ll>
#define mst(arr,value) memset(arr,value,sizeof(arr));
#define tst() _fastio;int testsalam;cin >> testsalam;while(testsalam--)
#define Mod 100000007
#define YES cout<<"Yes"<<endl;
#define NO cout<<"No"<<endl;
#define endl '\n'
//void inversemod(ll n, ll mod, ll invmod[],ll MOD){for(int i=2; i<=n; ++i) invmod[i]=MOD-MOD/i*invmod[MOD%i]%MOD;}
//void bigmod( ll a, ll b ,ll mod){ll r = 1;a = a%mod;while(b){if( b%2 ) r = (r*a)%mod;b = b/2;a = (a*a)%mod; }return (ll)r;}
string inttostr(ll n){std::stringstream ss;ss << n;string out=ss.str();return out;}
ll stringtoint(string s){istringstream iss (s);ll n;iss >> n;return n;}
template <typename T> T gcd(T a,T b){if(a < 0)return gcd(-a,b);if(b < 0)return gcd(a,-b);return (b == 0)?a:gcd(b,a%b);}
template <typename T> T lcm(T a,T b) {if(a < 0)return lcm(-a,b);if(b < 0)return lcm(a,-b);return a*(b/gcd(a,b));}
typedef vector<ll>vec;
typedef pair<ll,ll> pii;
typedef map<ll,ll>mpll;
typedef set<ll>seet;

int main()
{
	map<pair<ll,ll>,int>mp;
	vector<pair<ll,ll>> r;
    tst()
    {
    	string s;
    	cin >> s;
    	string a="",b="",c="";
    	int i=0;
    	for ( i = 0; s[i]!='+'; ++i)
    	{
    		if(isdigit(s[i]))
    			a+=s[i];
    	}
    	for ( ; s[i]!=')'; ++i)
    	{
    		if(isdigit(s[i]))
    			b+=s[i];
    	}
    	for (; i<s.size(); ++i)
    	{
    		if(isdigit(s[i]))
    			c+=s[i];
    	}
    	ll aa=stringtoint(a);
    	ll bb=stringtoint(b);
    	ll cc=stringtoint(c);
    	aa+=bb;
    	ll g=__gcd(aa,cc);
    	r.push_back({aa/g,cc/g});
    	mp[r.back()]++;
    }
    for(auto x:r)cout<<mp[x]<<' ';cout<<endl;
}
/*
 		remember:
 		ll vs int
 		array size
 		case for 1 2 3
*/


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
map<float,int > mp;
float cnt[200005];
int main()
{
	int m;
	cin>>m;
	for(int i=1;i<=m;i++)
	{
		char s1,s2,s3,s4;
		int a,b,c;
		cin>>s1>>a>>s2>>b>>s3>>s4>>c;
		cnt[i]=(((a+b)*1.0)/c);
		mp[cnt[i]]++;
	}
	for(int i=1;i<=m;i++)
	{
		if(i==m)
		cout<<mp[cnt[i]]<<endl;
		else
		cout<<mp[cnt[i]]<<" ";
	}
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
map<int,int > mp;
int cnt[200005];
int main()
{
	int m;
	cin>>m;
	for(int i=1;i<=m;i++)
	{
		char s1,s2,s3,s4;
		int a,b,c;
		cin>>s1>>a>>s2>>b>>s3>>s4>>c;
		cnt[i]=(a+b)/c;
		mp[cnt[i]]++;
	}
	for(int i=1;i<=m;i++)
	{
		if(i==m)
		cout<<mp[cnt[i]]<<endl;
		else
		cout<<mp[cnt[i]]<<" ";
	}
}


#include<bits/stdc++.h>
#define lld long long int
#define vec vector<lld>
#define pb push_back
#define ss second
#define ff first
#define mp make_pair
#define mod 1000000007
using namespace std;
int main() {ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);//lld t=0;cin>>t;while(t--){

        lld n,m,i,j,k,p,q,x,y,ans=0,cnt=0; //bool flag=false;
        unordered_map <lld,lld> mps;
        vec v;
        cin>>n;
        while(n--)
        {string s;cin>>s;
        string a; string b; string c;
        i=1;
        while(s[i]!='+')
        {a+=s[i];i++;}
        i++;
        while(s[i]!=')')
        {b+=s[i];i++;}
        i+=2;
        while(i<s.length())
        {c+=s[i];i++;}

        lld aa=0,bb=0,cc=0;
        j=1;
        for(i=a.length()-1;i>=0;i--)
        {
            aa+=(lld)(a[i]-'0')*j;
            j*=10;
        }
        j=1;
        for(i=b.length()-1;i>=0;i--)
        {
            bb+=(lld)(b[i]-'0')*j;
            j*=10;
        }
        j=1;
        for(i=c.length()-1;i>=0;i--)
        {
            cc+=(lld)(c[i]-'0')*j;
            j*=10;
        }
        //cout<<aa<<" "<<bb<<" "<<cc<<endl;
        x=(aa+bb)/cc;
        v.pb(x);
        if(mps.find(x)==mps.end())
            mps[x]=1;
        else
            mps[x]++;}
        for(auto u: v)
            cout<<mps[u]<<" ";
        cout<<endl;

    //}
	return 0;
}
/*  CODED BY:-
           __        __
 /\   /\  |__)  /\  |  \ |__| \ /  /\
/~~\ /~~\ |  \ /~~\ |__/ |  |  |  /~~\

*/


#include<bits/stdc++.h>
#define lld long long int
#define vec vector<lld>
#define pb push_back
#define ss second
#define ff first
#define mp make_pair
#define mod 1000000007
using namespace std;
int main() {ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);//lld t=0;cin>>t;while(t--){

        lld n,m,i,j,k,p,q,x,y,ans=0,cnt=0; //bool flag=false;
        unordered_map <double,lld> mps;
        vector<double> v;
        cin>>n;
        while(n--)
        {string s;cin>>s;
        string a; string b; string c;
        i=1;
        while(s[i]!='+')
        {a+=s[i];i++;}
        i++;
        while(s[i]!=')')
        {b+=s[i];i++;}
        i+=2;
        while(i<s.length())
        {c+=s[i];i++;}

        lld aa=0,bb=0,cc=0;
        j=1;
        for(i=a.length()-1;i>=0;i--)
        {
            aa+=(lld)(a[i]-'0')*j;
            j*=10;
        }
        j=1;
        for(i=b.length()-1;i>=0;i--)
        {
            bb+=(lld)(b[i]-'0')*j;
            j*=10;
        }
        j=1;
        for(i=c.length()-1;i>=0;i--)
        {
            cc+=(lld)(c[i]-'0')*j;
            j*=10;
        }
        //cout<<aa<<" "<<bb<<" "<<cc<<endl;
        double xx=((double)aa+ (double) bb)/(double)cc;
        //cout<<xx<<endl;
        v.pb(xx);
        if(mps.find(xx)==mps.end())
            mps[xx]=1;
        else
            mps[xx]++;}
        //cout<<" coordinates : "<<endl;
        //for(auto u: v)
        //    cout<<u<<" ";
        //cout<<endl;
        for(auto u: v)
            cout<<mps[u]<<" ";
        cout<<endl;

    //}
	return 0;
}
/*  CODED BY:-
           __        __
 /\   /\  |__)  /\  |  \ |__| \ /  /\
/~~\ /~~\ |  \ /~~\ |__/ |  |  |  /~~\

*/


#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll a[200005],mem[200005],ans[200005];
int main()
{

    int n,a,b,c;
    char x;
    scanf("%d",&n);
    getchar();
    for(int i=0;i<n;i++)
    {
        scanf("(%d+%d)%c%d",&a,&b,&x,&c);
        getchar();
      //  cout<<a<<' '<<b<<' '<<c<<endl;
        mem[i]=(int)(a+b+0.5)/c;
        ans[(int)(a+b+0.5)/c]++;
    }

    cout<<ans[mem[0]];
    for(int i=1;i<n;i++)
    {
        cout<<' '<<ans[mem[i]];
    }
    cout<<endl;

    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll a[200005];
double mem[200005],ans[200005];
map<double ,int >mp;
int main()
{

    int n;
    double a,b,c;
    char x;
    scanf("%d",&n);
    getchar();
    for(int i=0;i<n;i++)
    {
        scanf("(%lf+%lf)/%lf",&a,&b,&c);
        getchar();
      //  cout<<a<<' '<<b<<' '<<c<<endl;
        mem[i]=(a+b)/c;
        mp[mem[i]]++;
    }

    cout<<mp[mem[0]];
    for(int i=1;i<n;i++)
    {
        cout<<' '<<mp[mem[i]];
    }
    cout<<endl;

    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll a[200005],mem[200005],ans[200005];
int main()
{

    int n,a,b,c;
    char x;
    scanf("%d",&n);
    getchar();
    for(int i=0;i<n;i++)
    {
        scanf("(%d+%d)%c%d",&a,&b,&x,&c);
        getchar();
      //  cout<<a<<' '<<b<<' '<<c<<endl;
        mem[i]=(int)(a+b+0.5)/c;
        ans[(int)(a+b+0.5)/c]++;
    }
    for(int i=0;i<n;i++)
    {
        cout<<mem[i]<<' ';
    }cout<<endl;
    cout<<ans[mem[0]];
    for(int i=1;i<n;i++)
    {
        cout<<' '<<ans[mem[i]];
    }
    cout<<endl;

    return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll a[200005],mem[200005],ans[200005];
int main()
{

    int n,a,b,c;
    char x;
    scanf("%d",&n);
    getchar();
    for(int i=0;i<n;i++)
    {
        scanf("(%d+%d)%c%d",&a,&b,&x,&c);
        getchar();
     //   cout<<a<<' '<<b<<' '<<c<<endl;
        mem[i]=(a+b)/c;
        ans[(a+b)/c]++;
    }
    cout<<ans[mem[0]];
    for(int i=1;i<n;i++)
    {
        cout<<' '<<ans[mem[i]];
    }
    cout<<endl;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<long long> vl;
typedef pair<long long, long long> pl;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef map<long long, long long> ml;
typedef set<long long> sl;
typedef map<int, int> mi;
typedef set<int> si;

#define PB push_back
#define MP make_pair
#define F first
#define S second
#define REPI(i, a, b) for(ll i = a; i < b; ++i)
#define REPJ(j, a, b) for(ll j = a; j < b; ++j)

const int MOD = 1000000007;

int add(int a, int b) {
	a += b;
	if (a >= MOD) a -= MOD;
	if (a < 0) a += MOD;
	return a;
}

int mult(int a, int b) {
	return a * 1ll * b % MOD;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    vector<double> vec(n);
    map<double, ll> mapa;
    REPI(i, 0, n){
        string s;
        cin >> s;
        double a = 0, b = 0, c = 0;
        int j = 1;
        a += s[j]-'0';
        ++j;
        if (s[j] != '+'){
            a *= 10;
            a += s[j]-'0';
            ++j;
        }
        ++j;
        b += s[j]-'0';
        ++j;
        if (s[j] != ')'){
            b *= 10;
            b += s[j]-'0';
            ++j;
        }
        ++j;
        ++j;
        c += s[j]-'0';
        ++j;
      //  cout << c << endl;
        if (j < s.size()){
            c *= 10;
            c += s[j]-'0';
        }
      //  cout << a << " " << b << " " << c << endl;
        vec[i] = (a+b)/c;
        ++mapa[vec[i]];
    }
    REPI(i, 0, n){
        cout <<  mapa[vec[i]] << " ";
    }
    cout << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<long long> vl;
typedef pair<long long, long long> pl;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef map<long long, long long> ml;
typedef set<long long> sl;
typedef map<int, int> mi;
typedef set<int> si;

#define PB push_back
#define MP make_pair
#define F first
#define S second
#define REPI(i, a, b) for(ll i = a; i < b; ++i)
#define REPJ(j, a, b) for(ll j = a; j < b; ++j)

const int MOD = 1000000007;

int add(int a, int b) {
	a += b;
	if (a >= MOD) a -= MOD;
	if (a < 0) a += MOD;
	return a;
}

int mult(int a, int b) {
	return a * 1ll * b % MOD;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    vector<double> vec(n);
    map<double, ll> mapa;
    REPI(i, 0, n){
        string s;
        cin >> s;
        double a = 0, b = 0, c = 0;
        int j = 1;
        a += s[j]-'0';
        ++j;
        if (s[j] != '+'){
            a *= 10;
            a += s[j]-'0';
            ++j;
        }
        ++j;
        b += s[j]-'0';
        ++j;
        if (s[j] != ')'){
            b *= 10;
            b += s[j]-'0';
            ++j;
        }
        ++j;
        c += s[j]-'0';
        ++j;
        if (j != s.size()-1){
            c += s[j]-'0';
        }
        vec[i] = (a+b)/c;
        ++mapa[vec[i]];
    }
    REPI(i, 0, n){
        cout << mapa[vec[i]] << " ";
    }
    cout << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio( false ), cin.tie( nullptr ), cout.tie( nullptr );

    int m; cin >> m; map< pair< size_t, size_t >, size_t > x; vector< pair< size_t, size_t > > y;

    for( int i = 0; i < m; i++ )
    {
        string s; cin >> s;

        size_t j = s.find( '+' ), k = s.find( '/' );

        size_t a = s[ 1 ] - '0', b = s[ j + 1 ] - '0', c = s[ k + 1 ] - '0';

        if ( j == 3 )
            a *= 10, a += s[ 2 ] - '0';

        if ( s[ j + 2 ] != ')' )
            b *= 10, b += s[ j + 2 ] - '0';

        if ( s.length() > ( k + 2 ) )
            c *= 10, c += s[ k + 2 ] - '0';

        size_t d = a + b, g =  __gcd( d, c ); d /= g, c /= g;

        x[ make_pair(c,d) ]++, y.push_back( make_pair( c,d ) );

    }

    for( int i = 0; i < m; i++ )
        cout << x[ y[ i ] ] << ' ';
}


#include <bits/stdc++.h>

using namespace std;

typedef pair< int, int > pair_t;

string s; pair_t location[ 200000 ]; map< pair_t, int > ships;

inline int number( int i )
{
    int x = s[ ++i ] - '0', y = s[ ++i ] - '0';

    if ( y >= 0 && y <= 9 )
        x *= 10, x += y;

    return x;
}

inline pair_t expr()
{
    int a = number( 0 ), b = number( s.find( '+' ) ), c = number( s.find( '/' ) );

    int d = a + b, g = __gcd( d, c );

    return make_pair( d / g, c / g );
}

int main()
{
    int m; ios_base::sync_with_stdio( false ), cin.tie( nullptr ), cout.tie( nullptr ), cin >> m;

    for( int i = 0; i < m; i++ )
        cin >> s, s += '.', ships[ location[ i ] = expr() ]++;

    for( int i = 0; i < m; i++ )
        cout << ships[ location[ i ] ] << ' ';
}


#include <bits/stdc++.h>

using namespace std;

typedef pair< int, int > pair_t;

char s[ 11 ]; pair_t location[ 200000 ]; map< pair_t, int > ships;

inline int find_char( char c )
{
    for( int i = 0; s[ i ] != 0; i++ )
        if ( s[ i ] == c )
            return i;

    return -1;
}

inline int number( int i )
{
    int x = s[ ++i ] - '0', y = s[ ++i ] - '0';

    if ( y >= 0 && y <= 9 )
        x *= 10, x += y;

    return x;
}

inline pair_t expr()
{
    int a = number( 0 ), b = number( find_char( '+' ) ), c = number( find_char( '/' ) );

    int d = a + b, g = __gcd( d, c );

    return make_pair( d / g, c / g );
}

int main()
{
    int m; scanf( "%i", &m );

    for( int i = 0; i < m; i++ )
        scanf( "%s", s ), ships[ location[ i ] = expr() ]++;

    for( int i = 0; i < m; i++ )
        printf( "%i ", ships[ location[ i ] ] );
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio( false ), cin.tie( nullptr ), cout.tie( nullptr );

    int m; cin >> m; typedef pair< int, int > pair_t;

    map< pair_t, int > count; vector< pair_t > location;

    class expression_t: public pair_t
    {
        string s;

        int number( int i )
        {
            int x = s[ ++i ] - '0', y = s[ ++i ] - '0';

            if ( y >= 0 && y <= 9 )
                x *= 10, x += y;

            return x;
        }

    public:

        void read()
        {
            cin >> s, s += '.';

            int a = number( 0 ), b = number( s.find( '+' ) ), c = number( s.find( '/' ) );

            int d = a + b, g = __gcd( d, c );

            first = d / g, second = c / g;
        }

    } expr;

    for( int i = 0; i < m; i++ )
        expr.read(), location.push_back( expr ), count[ expr ]++;

    for( int i = 0; i < m; i++ )
        cout << count[ location[ i ] ] << ' ';
}


#include <bits/stdc++.h>
#include <fstream>
#include <iostream>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define maxim INT_MAX
#define fi first
#define se second
#define mod 1000000007
ll gcd(ll a,ll b)
{
    while(b>0)
    {
        a%=b;
        swap(a,b);
    }
    return a;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n;
    cin>>n;
    int ar[n];
    for(ll i=0;i<n;i++)
    {
        string str;
        cin>>str;
        str+=')';
        ll a=0,b=0,c=0;
        ll k=0;
        for(ll j=1;j<str.length();j++)
        {
            if(str[j]>='0'&&str[j]<='9')
            {
                k=k*10+str[j]-'0';
            }
            else if(k>0)
            {
                if(a==0)
                {
                    a=k;
                    k=0;
                }
                else if(b==0)
                {
                    b=k;
                    k=0;
                }
                else if(c==0)
                {
                    c=k;
                    k=0;
                }
            }
        }
        ar[i]=(a+b)/c;
    }
    map<int,int> m;
    for(ll i=0;i<n;i++)
    {
        m[ar[i]]++;
    }
    for(ll i=0;i<n;i++)
    {
        cout<<m[ar[i]]<<" ";
    }

}


#include <bits/stdc++.h>
#include <fstream>
#include <iostream>
using namespace std;
#define ll long long int
#define pb push_back
#define mp make_pair
#define maxim INT_MAX
#define fi first
#define se second
#define mod 1000000007
ll gcd(ll a,ll b)
{
    while(b>0)
    {
        a%=b;
        swap(a,b);
    }
    return a;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n;
    cin>>n;
    double ar[n];
    for(ll i=0;i<n;i++)
    {
        string str;
        cin>>str;
        str+=')';
        ll a=0,b=0,c=0;
        ll k=0;
        for(ll j=1;j<str.length();j++)
        {
            if(str[j]>='0'&&str[j]<='9')
            {
                k=k*10+str[j]-'0';
            }
            else if(k>0)
            {
                if(a==0)
                {
                    a=k;
                    k=0;
                }
                else if(b==0)
                {
                    b=k;
                    k=0;
                }
                else if(c==0)
                {
                    c=k;
                    k=0;
                }
            }
        }
        ar[i]=double(a+b)/c;
    }
    map<double,int> m;
    for(ll i=0;i<n;i++)
    {
        m[ar[i]]++;
    }
    for(ll i=0;i<n;i++)
    {
        cout<<m[ar[i]]<<" ";
    }

}


#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<string>
#include<string.h>
#include<queue>
#include<set>
#include<map>
#include<stack>
#include<vector>
#include<cstdlib>
#include<math.h>
#include<cstring>
typedef long long int ll;
using namespace std;

int main()
{
 int n,m1,n1,n2,nl,m,i,j,sum=0,p[3];
 vector<double>lp;
map<double,int>mp;
    cin>>n;
    string s;
    getchar();
    for(j=0;j<n;j++)
    {
        getchar();
        getline(cin,s);
         n1=0;
        for(i=0;i<s.length();i++)
        {
            if(s[i]>='0'&&s[i]<='9')
            {
                sum=0;
                while(s[i]>='0'&&s[i]<='9')
                {
                    sum*=10;
                    sum+=s[i]-'0';
                    i++;
                }
                p[n1]=sum;
                n1++;
            }
        }
        double k=(p[0]+p[1])/(p[2]*1.0);
        mp[k]++;
        lp.push_back(k);
    }
    for(int i=0;i<lp.size();i++)
       cout<<mp[lp[i]]<<" ";

     return 0;
}


#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<string>
#include<string.h>
#include<queue>
#include<set>
#include<map>
#include<stack>
#include<vector>
#include<cstdlib>
#include<math.h>
#include<cstring>
typedef long long int ll;
using namespace std;
 int n,lp,m1,n1,n2,nl,m,i,j,k,sum=0,p[3],a[1000],b[1000],c[1000][1000];
int main()
{

    string s,s1;
   memset(a,0,sizeof(a));
   memset(c,0,sizeof(c));
    cin>>n;
    getchar();
    for(j=0;j<n;j++)
    {
        getchar();
        getline(cin,s);
         n1=0;
        for(i=0;i<s.length();i++)
        {
            if(s[i]>='0'&&s[i]<='9')
            {
                sum=0;
                while(s[i]>='0'&&s[i]<='9')
                {
                    sum*=10;
                    sum+=s[i]-'0';
                    i++;
                }
                p[n1]=sum;
                n1++;
            }
        }
        b[j]=(p[0]+p[1])/p[2];
        a[j]=(p[0]+p[1])%p[2];
        c[b[j]][a[j]]++;
    }
    for(j=0;j<n-1;j++)
    cout<<c[b[j]][a[j]]<<" ";
    cout<<c[b[n-1]][a[n-1]];
     return 0;
}


#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<iostream>

using namespace std;

int main()
{
   long long int i,j,n,k,a[1000001];
   char s[10000];
   cin>>n>>s;
   cout<<s;
   return 0;
}


#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<string>
#include<string.h>
#include<queue>
#include<set>
#include<map>
#include<stack>
#include<vector>
#include<cstdlib>
#include<math.h>
#include<cstring>
typedef long long int ll;
using namespace std;
vector<double>lp;
map<double,int>mp;
int main()
{
 int n,m1,n1,n2,nl,m,i,j,sum=0,p[3];
    cin>>n;
    string s;
    getchar();
    for(j=0;j<n;j++)
    {
        getchar();
        getline(cin,s);
         n1=0;
        for(i=0;i<s.length();i++)
        {
            if(s[i]>='0'&&s[i]<='9')
            {
                sum=0;
                while(s[i]>='0'&&s[i]<='9')
                {
                    sum*=10;
                    sum+=s[i]-'0';
                    i++;
                }
                p[n1]=sum;
                n1++;
            }
        }
        double k=(p[0]+p[1])/p[2];
        mp[k]++;
        lp.push_back(k);
    }
   for(i=0;i<lp.size();i++)
   {
       cout<<mp[lp[i]]<<" ";
   }
     return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
class point{
public:
	int fz;
	int fm;
	int t;
};
point a[200010];
point b[200010];
int yuefen(int x, int y)
{
	int t;
	if (x < y)
	{
		t = x; x = y; y = t;
	}
	while (y != 0)
	{
		t = x%y;
		x = y;
		y = t;
	}
	return x;
}
int main()
{
	int i, j, g=0, m;
	int x1, x2,y1;
	int p;
	int ok = 0;
	scanf("%d", &m);
	getchar();
	for (i = 1; i <= m; i++)
		b[i].t = 0;
	for (i = 1; i <= m; i++)
	{
		scanf("(%d+%d)/%d", &x1, &x2, &y1);
		getchar();
		p = yuefen((x1 + x1), y1);
		a[i].fz = (x1 + x2) / p;
		a[i].fm = y1 / p;
		ok = 0;
		for (j = 1; j <= g; j++)
		{
			if ((a[i].fz == b[j].fz) && (a[i].fm == b[j].fm))
			{
				a[i].t = j;
				ok = 1;
				b[j].t++;
				break;
			}
		}
		if (ok == 0) {
			g++;
			b[g].fz = a[i].fz;
			b[g].fm = a[i].fm;
			b[g].t++;
			a[i].t = g;
		}
	}
	for (i = 1; i < m; i++)
		printf("%d ", a[i].t);
	printf("%d",b[a[m].t].t);
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
class point{
public:
	int fz;
	int fm;
	int t;
};
point a[200010];
point b[200010];
int yuefen(int x, int y)
{
	int t;
	if (x < y)
	{
		t = x; x = y; y = t;
	}
	while (y != 0)
	{
		t = x%y;
		x = y;
		y = t;
	}
	return x;
}
int main()
{
	int i, j, g=0, m;
	int x1, x2,y1;
	int p;
	int ok = 0;
	scanf("%d", &m);
	getchar();
	for (i = 1; i <= m; i++)
		b[i].t = 0;
	for (i = 1; i <= m; i++)
	{
		scanf(" (%d + %d) / %d", &x1, &x2, &y1);
		getchar();
		p = yuefen((x1 + x2), y1);
		a[i].fz = (x1 + x2) / p;
		a[i].fm = y1 / p;
		ok = 0;
		for (j = 1; j <= g; j++)
		{
			if ((a[i].fz == b[j].fz) && (a[i].fm == b[j].fm))
			{
				a[i].t = j;
				ok = 1;
				b[j].t++;
			}
		}
		if (ok == 0) {
			g++;
			b[g].fz = a[i].fz;
			b[g].fm = a[i].fm;
			b[g].t++;
			a[i].t = g;
		}
	}
	for (i = 1; i < m; i++)
		printf("%d ", b[a[i].t].t);
	printf("%d",b[a[m].t].t);
	return 0;
}


#include <iostream>
#include<algorithm>
#include<string>
#include<map>
#include <iterator>
#include<iomanip>
#include<vector>
#include<cmath>
#include <cstdio>
#include<queue>
#include<stack>
#include<list>
#include<stdio.h>
#include<set>
#include <functional>

#define mod 1000000007
#define mod2 30000000
#define pa(a,b) make_pair(a,b)
#define f first
#define s second
#define pb(a)  push_back(a)
#define all(a) a.begin() , a.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define LL  long long int
#define oo 1e9
#define pi 3.14159265359
#define eps  1e-9

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

LL maxx(LL a , LL b){ return a>b ?  a : b ;}
LL minn(LL a , LL b){ return a>b ?  b : a ;}

using namespace std;
int dx[] = {1 , 1 ,1 , 0 , 0  , -1 , -1  , -1  , 0 };
int dy[] = { -1 , 0  , 1 , 1 , -1 , 0 , 1 , -1 , 0 };
void boostIO()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
LL gcd(LL a, LL b) {
    return b == 0 ? a : gcd(b, a % b);
}
LL lcm(LL a , LL b )
{
    return (a*b)/gcd(a , b);
}
LL poww(LL base, LL exp){
  base %= mod;
  LL result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % mod;
    base = (base * base) % mod;
    exp >>= 1;
  }
  return result;
}
map<pair<LL,LL>, int> mp ;
vector<pair<LL,LL>>ans;
pair<LL,LL>solve(string s)
{
    LL num[3] = {0}; int cnt = 0 ;
    for(int i = 1 ; i < s.size() ; i++){
        if(s[i] == '+'){
            cnt++ ;
            continue;
        }
        else if(s[i] == '/'){
            cnt++;
            continue;
        }
        else if(s[i] == ')')
            continue;
        num[cnt] = (num[cnt] * 10 + (s[i] - '0')) ;
    }
    LL above = num[0] + num[1] , down = num[2] ;
    pair<LL,LL>ret ;
    while(gcd(above , down) != 1){
        LL g = gcd(above , down) ;
        above /= g , down /= g ;
    }
    return pa(above , down) ;
}
int main()
{
    boostIO() ;
    int n ; cin >> n ;
    for(int i = 0 ; i < n ; i++){
        string s; cin >> s;
        mp[solve(s)]++ ; ans.pb(solve(s)) ;
    }
    for(int i = 0 ; i < n ; i++)
        cout << mp[ans[i]] << " " ;
}


#include <iostream>
#include <vector>
#include <cstdio>
#include <map>
#include <string>
#include <algorithm>
using namespace std;

map<pair<int, int>, int > mp;

int gcd(int a, int b) {
	while (b) {
		a %= b;
		swap(a, b);
	}
	return a;
}

vector<pair<int, int> > v;

int main(){
	ios_base::sync_with_stdio(false);
	int n;
	cin >> n;
	for (int i = 0; i < n; i++){
		string s,t;
		int a, b, c;
		cin >> s;
		int j = 1;
		while (s[j] != '+'){
			t += s[j];
			j++;
		}
		if (t.length() == 2){
			a = (t[0] - '0') * 10 + t[1] - '0';
		}
		else{
			a = t[0] - '0';
		}
		t = "";
		j++;
		while (s[j] != ')'){
			t += s[j];
			j++;
		}
		if (t.length() == 2){
			b = (t[0] - '0') * 10 + t[1] - '0';
		}
		else{
			b = t[0] - '0';
		}
		t = "";
		j++;
		j++;
		while (j<s.length()){
			t += s[j];
			j++;
		}
		if (t.length() == 2){
			c = (t[0] - '0') * 10 + t[1] - '0';
		}
		else{
			c = t[0] - '0';
		}
		//cout << a << " " << b << " " << c << endl;
		mp[make_pair((a + b) / gcd(a + b, c), c / gcd(a + b, c))]++;
		v.push_back(make_pair((a + b) / gcd(a + b, c), c / gcd(a + b, c)));
	}
	for (int i = 0; i < v.size(); i++){
		cout << mp[v[i]] << " ";
	}
	return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
int main()
{
	double y,a,b,c,z;
	vector<double>t;
	char s;
	map<double,int>mp;
	vector<double>o;
	cin>>y;
	for(int i=0;i<y;i++)
	{
		cin>>s>>a>>s>>b>>s>>s>>c;
		z=(a+b)/c;
		mp[z]++;
		o.push_back(z);

	}
	while(!o.empty())
	{
		//cout<<o.front()<<" ";
		t.push_back(mp[o.front()]);
		o.erase(o.begin());
	}

	while(!t.empty())
	{
		cout<<t.front()<<" ";
		t.erase(t.begin());
	}

 return 0;
}


#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
int main()
{
	int y,a,b,c,z;
	vector<int>t;
	string s;
	map<int,int>mp;
	vector<int>o;
	cin>>y;
	for(int i=0;i<y;i++)
	{
		cin>>s;
		int r=2;
		while(s.substr(r,1)!="+")
			r++;
		//cout<<r<<endl;
		a=stoi(s.substr(1,r-1));
		//cout<<a<<endl;
		int e=r;
		while(s.substr(e,1)!="/")
			e++;
		//cout<<e<<endl;
		b=stoi(s.substr(r+1,e-1-r));
		//cout<<b<<endl;
		int si=s.size()-e;
		c=stoi(s.substr(e+1,si));
	//cout<<a<<b<<c;
		z=(a+b)/c;
		mp[z]++;
		o.push_back(z);

	}
	while(!o.empty())
	{
		//cout<<o.front()<<" ";
		t.push_back(mp[o.front()]);
		o.erase(o.begin());
	}

	while(!t.empty())
	{
		cout<<t.front()<<" ";
		t.erase(t.begin());
	}

 return 0;
}