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

#define pf                  printf
#define sf(a)               scanf("%d",&a)
#define sfl(a)              scanf("%lld",&a)
#define sff(a,b)            scanf("%d %d",&a,&b)
#define sffl(a,b)           scanf("%lld %lld",&a,&b)
#define sfff(a,b,c)         scanf("%d %d %d",&a,&b,&c)
#define sfffl(a,b,c)        scanf("%lld %lld %lld",&a,&b,&c)
#define sffff(a,b,c,d)      scanf("%d %d %d %d",&a,&b,&c,&d)
#define sffffl(a,b,c,d)     scanf("%lld %lld %lld %lld",&a,&b,&c,&d)
#define sfffff(a,b,c,d,e)   scanf("%d %d %d %d %d",&a,&b,&c,&d,&e)
#define sfffffl(a,b,c,d,e)  scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e)
#define sfc(a)              scanf("%c",&a)
#define pii                 pair<int,int>
#define ms(a,b)             memset(a,b,sizeof(a))
#define pb(a)               push_back(a)
#define pbp(a,b)            push_back({a,b})
#define db                  double
#define ft                  float
#define ll                  long long
#define ull                 unsigned long long
#define pii                 pair<int,int>
#define ff                  first
#define ss                  second
#define sz(x)               x.size()
#define all(x)              x.begin(),x.end()
#define CIN                 ios_base::sync_with_stdio(0); cin.tie(0)
#define max3(a, b, c)       max(a, b) > max(b, c) ? max(a, b) : max(b, c)
#define min3(a, b, c)       min(a, b) < min(b, c) ? min(a, b) : min(b, c)
#define for0(i,n)           for(int i=0;i<n;i++)
#define for1(i,n)           for(int i=1;i<=n;i++)
#define forrev(i,n)         for(int i=n-1; i>=0; i--)
#define forab(i,a,b)        for(int i=a;i<=b;i++)
#define forba(i,b,a)        for(int i=b;i>=a;i--)
#define stlloop(x)          for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define gcd(a, b)           __gcd(a, b)
#define lcm(a, b)           ((a)*((b)/gcd(a,b)))
#define case1(z)            cout<<"Case "<<z<<": "
#define case2(z)            printf("Case %d: ",z)
#define PI                  acos(-1) //3.14159265358979323846264338328
#define valid(tx,ty)        tx>=0 && tx<row && ty>=0 && ty<col
#define intlim              2147483648
#define N                   200005
#define inf                 100000008
#define mod                 1000000007

/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

ll a[N],b[N],c[N],d[N],e[N],f[N],ne[N],nf[N];
int main()
{
    ll n,i,Max1=0,Max2=0,Max3=0,Max4=0,Max=0,k=0;
    cin>>n;
    for1(i,n)
        cin>>a[i];

    for1(i,n)
        cin>>b[i];

    for1(i,n)
    {
        if(b[i]!=0 && a[i]!=0 && a[i]%b[i]==0)
        {
            c[i]=a[i]/b[i];
            if(c[i]<0)
            {
                c[i]=c[i]*(-1);
                ne[c[i]]++;
            }
            else
                e[c[i]]++;
            //cout<<c[i]<<endl;
        }
        else if(a[i]!=0 && b[i]%a[i]==0)
        {
            d[i]=b[i]/a[i];
            if(d[i]<0)
            {
                d[i]=d[i]*(-1);
                nf[d[i]]++;
            }
            else
                f[d[i]]++;
            //cout<<d[i]<<endl;
        }
        else if(a[i]!=0 && b[i]==0)
        {
            e[0]++;
        }
        else if(a[i]==0 && b[i]==0)
        {
            e[0]++;
            k=5;
        }

    }
    for1(i,N-2)
    {
        Max1=max(Max1,e[i-1]);
        //cout<<"E--  "<<e[i]<<" "<<e[i-1]<<endl;
        Max2=max(Max2,f[i-1]);
        //cout<<"F--  "<<f[i]<<" "<<f[i-1]<<endl;
        //cout<<Max1<<" "<<Max2<<endl;
        Max3=max(Max3,ne[i-1]);
        Max4=max(Max4,nf[i-1]);
    }
    Max=max3(Max,Max1,Max2);
    Max=max3(Max,Max4,Max3);

    cout<<Max<<endl;
	return 0;
}


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

#define pf                  printf
#define sf(a)               scanf("%d",&a)
#define sfl(a)              scanf("%lld",&a)
#define sff(a,b)            scanf("%d %d",&a,&b)
#define sffl(a,b)           scanf("%lld %lld",&a,&b)
#define sfff(a,b,c)         scanf("%d %d %d",&a,&b,&c)
#define sfffl(a,b,c)        scanf("%lld %lld %lld",&a,&b,&c)
#define sffff(a,b,c,d)      scanf("%d %d %d %d",&a,&b,&c,&d)
#define sffffl(a,b,c,d)     scanf("%lld %lld %lld %lld",&a,&b,&c,&d)
#define sfffff(a,b,c,d,e)   scanf("%d %d %d %d %d",&a,&b,&c,&d,&e)
#define sfffffl(a,b,c,d,e)  scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e)
#define sfc(a)              scanf("%c",&a)
#define pii                 pair<int,int>
#define ms(a,b)             memset(a,b,sizeof(a))
#define pb(a)               push_back(a)
#define pbp(a,b)            push_back({a,b})
#define db                  double
#define ft                  float
#define ll                  long long
#define ull                 unsigned long long
#define pii                 pair<int,int>
#define ff                  first
#define ss                  second
#define sz(x)               x.size()
#define all(x)              x.begin(),x.end()
#define CIN                 ios_base::sync_with_stdio(0); cin.tie(0)
#define max3(a, b, c)       max(a, b) > max(b, c) ? max(a, b) : max(b, c)
#define min3(a, b, c)       min(a, b) < min(b, c) ? min(a, b) : min(b, c)
#define for0(i,n)           for(int i=0;i<n;i++)
#define for1(i,n)           for(int i=1;i<=n;i++)
#define forrev(i,n)         for(int i=n-1; i>=0; i--)
#define forab(i,a,b)        for(int i=a;i<=b;i++)
#define forba(i,b,a)        for(int i=b;i>=a;i--)
#define stlloop(x)          for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define gcd(a, b)           __gcd(a, b)
#define lcm(a, b)           ((a)*((b)/gcd(a,b)))
#define case1(z)            cout<<"Case "<<z<<": "
#define case2(z)            printf("Case %d: ",z)
#define PI                  acos(-1) //3.14159265358979323846264338328
#define valid(tx,ty)        tx>=0 && tx<row && ty>=0 && ty<col
#define intlim              2147483648
#define N                   200005
#define inf                 100000008
#define mod                 1000000007

/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

ll a[N],b[N],c[N],d[N],e[N],f[N],ne[N],nf[N];
int main()
{
    ll n,i,Max1=0,Max2=0,Max3=0,Max4=0,Max=0,k=0;
    cin>>n;
    for1(i,n)
        cin>>a[i];

    for1(i,n)
        cin>>b[i];

    for1(i,n)
    {
        if(b[i]!=0 && a[i]!=0 && a[i]%b[i]==0)
        {
            c[i]=a[i]/b[i];
            if(c[i]<0)
            {
                c[i]=c[i]*(-1);
                ne[c[i]]++;
            }
            else
                e[c[i]]++;
            //cout<<c[i]<<endl;
        }
        else if(a[i]!=0 && b[i]%a[i]==0)
        {
            d[i]=b[i]/a[i];
            if(d[i]<0)
            {
                d[i]=d[i]*(-1);
                nf[d[i]]++;
            }
            else
                f[d[i]]++;
            //cout<<d[i]<<endl;
        }
        else if(a[i]!=0 && b[i]==0)
        {
            c[0]++;
        }
        else if(a[i]==0 && b[i]==0)
        {
            c[0]++;
            k=5;
        }

    }
    for1(i,N-2)
    {
        Max1=max(Max1,e[i-1]);
        //cout<<"E--  "<<e[i]<<" "<<e[i-1]<<endl;
        Max2=max(Max2,f[i-1]);
        //cout<<"F--  "<<f[i]<<" "<<f[i-1]<<endl;
        //cout<<Max1<<" "<<Max2<<endl;
        Max3=max(Max3,ne[i-1]);
        Max4=max(Max4,nf[i-1]);
    }
    Max=max3(Max,Max1,Max2);
    Max=max3(Max,Max4,Max3);
    if(k==5)
        Max+=c[0];
    cout<<Max<<endl;
	return 0;
}


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

#define pf                  printf
#define sf(a)               scanf("%d",&a)
#define sfl(a)              scanf("%lld",&a)
#define sff(a,b)            scanf("%d %d",&a,&b)
#define sffl(a,b)           scanf("%lld %lld",&a,&b)
#define sfff(a,b,c)         scanf("%d %d %d",&a,&b,&c)
#define sfffl(a,b,c)        scanf("%lld %lld %lld",&a,&b,&c)
#define sffff(a,b,c,d)      scanf("%d %d %d %d",&a,&b,&c,&d)
#define sffffl(a,b,c,d)     scanf("%lld %lld %lld %lld",&a,&b,&c,&d)
#define sfffff(a,b,c,d,e)   scanf("%d %d %d %d %d",&a,&b,&c,&d,&e)
#define sfffffl(a,b,c,d,e)  scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e)
#define sfc(a)              scanf("%c",&a)
#define pii                 pair<int,int>
#define ms(a,b)             memset(a,b,sizeof(a))
#define pb(a)               push_back(a)
#define pbp(a,b)            push_back({a,b})
#define db                  double
#define ft                  float
#define ll                  long long
#define ull                 unsigned long long
#define pii                 pair<int,int>
#define ff                  first
#define ss                  second
#define sz(x)               x.size()
#define all(x)              x.begin(),x.end()
#define CIN                 ios_base::sync_with_stdio(0); cin.tie(0)
#define max3(a, b, c)       max(a, b) > max(b, c) ? max(a, b) : max(b, c)
#define min3(a, b, c)       min(a, b) < min(b, c) ? min(a, b) : min(b, c)
#define for0(i,n)           for(int i=0;i<n;i++)
#define for1(i,n)           for(int i=1;i<=n;i++)
#define forrev(i,n)         for(int i=n-1; i>=0; i--)
#define forab(i,a,b)        for(int i=a;i<=b;i++)
#define forba(i,b,a)        for(int i=b;i>=a;i--)
#define stlloop(x)          for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define gcd(a, b)           __gcd(a, b)
#define lcm(a, b)           ((a)*((b)/gcd(a,b)))
#define case1(z)            cout<<"Case "<<z<<": "
#define case2(z)            printf("Case %d: ",z)
#define PI                  acos(-1) //3.14159265358979323846264338328
#define valid(tx,ty)        tx>=0 && tx<row && ty>=0 && ty<col
#define intlim              2147483648
#define N                   200005
#define inf                 100000008
#define mod                 1000000007

/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

ll a[N],b[N],c[N],d[N],e[N],f[N],ne[N],nf[N];
int main()
{
    ll n,i,Max1=0,Max2=0,Max3=0,Max4=0,Max=0,k=0;
    cin>>n;
    for1(i,n)
        cin>>a[i];

    for1(i,n)
        cin>>b[i];

    for1(i,n)
    {
        if(b[i]!=0 && a[i]!=0 && a[i]%b[i]==0)
        {
            c[i]=a[i]/b[i];
            if(c[i]<0)
            {
                c[i]=c[i]*(-1);
                ne[c[i]]++;
            }
            else
                e[c[i]]++;
            //cout<<c[i]<<endl;
        }
        else if(a[i]!=0 && b[i]%a[i]==0)
        {
            d[i]=b[i]/a[i];
            if(d[i]<0)
            {
                d[i]=d[i]*(-1);
                nf[d[i]]++;
            }
            else
                f[d[i]]++;
            //cout<<d[i]<<endl;
        }
        else if(a[i]!=0 && b[i]==0)
        {
            c[0]++;
        }
        else if(a[i]==0 && b[i]==0)
        {
            c[0]++;
            k=5;
        }
        else if(a[i]==0 && b[i]!=0)
        {
            continue;
        }
    }
    for1(i,20)
    {
        Max1=max(Max1,e[i-1]);
        //cout<<"E--  "<<e[i]<<" "<<e[i-1]<<endl;
        Max2=max(Max2,f[i-1]);
        //cout<<"F--  "<<f[i]<<" "<<f[i-1]<<endl;
        //cout<<Max1<<" "<<Max2<<endl;
        Max3=max(Max3,ne[i-1]);
        Max4=max(Max4,nf[i-1]);
    }
    Max=max3(Max,Max1,Max2);
    Max=max3(Max,Max4,Max3);
    if(k==5)
        Max+=c[0];
    cout<<Max<<endl;
	return 0;
}


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

#define pf                  printf
#define sf(a)               scanf("%d",&a)
#define sfl(a)              scanf("%lld",&a)
#define sff(a,b)            scanf("%d %d",&a,&b)
#define sffl(a,b)           scanf("%lld %lld",&a,&b)
#define sfff(a,b,c)         scanf("%d %d %d",&a,&b,&c)
#define sfffl(a,b,c)        scanf("%lld %lld %lld",&a,&b,&c)
#define sffff(a,b,c,d)      scanf("%d %d %d %d",&a,&b,&c,&d)
#define sffffl(a,b,c,d)     scanf("%lld %lld %lld %lld",&a,&b,&c,&d)
#define sfffff(a,b,c,d,e)   scanf("%d %d %d %d %d",&a,&b,&c,&d,&e)
#define sfffffl(a,b,c,d,e)  scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e)
#define sfc(a)              scanf("%c",&a)
#define pii                 pair<int,int>
#define ms(a,b)             memset(a,b,sizeof(a))
#define pb(a)               push_back(a)
#define pbp(a,b)            push_back({a,b})
#define db                  double
#define ft                  float
#define ll                  long long
#define ull                 unsigned long long
#define pii                 pair<int,int>
#define ff                  first
#define ss                  second
#define sz(x)               x.size()
#define all(x)              x.begin(),x.end()
#define CIN                 ios_base::sync_with_stdio(0); cin.tie(0)
#define max3(a, b, c)       max(a, b) > max(b, c) ? max(a, b) : max(b, c)
#define min3(a, b, c)       min(a, b) < min(b, c) ? min(a, b) : min(b, c)
#define for0(i,n)           for(int i=0;i<n;i++)
#define for1(i,n)           for(int i=1;i<=n;i++)
#define forrev(i,n)         for(int i=n-1; i>=0; i--)
#define forab(i,a,b)        for(int i=a;i<=b;i++)
#define forba(i,b,a)        for(int i=b;i>=a;i--)
#define stlloop(x)          for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define gcd(a, b)           __gcd(a, b)
#define lcm(a, b)           ((a)*((b)/gcd(a,b)))
#define case1(z)            cout<<"Case "<<z<<": "
#define case2(z)            printf("Case %d: ",z)
#define PI                  acos(-1) //3.14159265358979323846264338328
#define valid(tx,ty)        tx>=0 && tx<row && ty>=0 && ty<col
#define intlim              2147483648
#define N                   200005
#define inf                 100000008
#define mod                 1000000007

/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

ll a[N],b[N],e[N],f[N],ne[N],nf[N];
int main()
{
    ll n,i,Max1=0,Max2=0,Max3=0,Max4=0,Max=0,k=0,l=0,x,y=0;
    cin>>n;
    for1(i,n)
        cin>>a[i];

    for1(i,n)
        cin>>b[i];

    for1(i,n)
    {
        if(b[i]!=0 && a[i]!=0 && a[i]%b[i]==0)
        {
            x=a[i]/b[i];
            if(x<0)
            {
                x=x*(-1);
                ne[ x ]++;
            }
            else
                e[ x ]++;
            //cout<<c[i]<<endl;
        }
        else if(a[i]!=0 && b[i]%a[i]==0)
        {
            x=b[i]/a[i];
            if(x<0)
            {
                x=x*(-1);
                nf[ x ]++;
            }
            else
                f[ x ]++;
            //cout<<d[i]<<endl;
        }
        else if(a[i]==0 && b[i]==0)
        {
            y++;
            k=5;
        }

    }
    for1(i,N-2)
    {
        Max1=max(Max1,e[i-1]);
        //cout<<"E--  "<<ne[i-1]<<" "<<e[i-1]<<endl;
        Max2=max(Max2,f[i-1]);
        //cout<<"F--  "<<nf[i-1]<<" "<<f[i-1]<<endl;
        //cout<<Max1<<" "<<Max2<<endl;
        Max3=max(Max3,ne[i-1]);
        Max4=max(Max4,nf[i-1]);

        //cout<<l<<endl;
    }

    Max=max3(Max,Max1,Max2);
    Max=max3(Max,Max4,Max3);

    cout<<Max+y<<endl;
	return 0;
}


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

#define pf                  printf
#define sf(a)               scanf("%d",&a)
#define sfl(a)              scanf("%lld",&a)
#define sff(a,b)            scanf("%d %d",&a,&b)
#define sffl(a,b)           scanf("%lld %lld",&a,&b)
#define sfff(a,b,c)         scanf("%d %d %d",&a,&b,&c)
#define sfffl(a,b,c)        scanf("%lld %lld %lld",&a,&b,&c)
#define sffff(a,b,c,d)      scanf("%d %d %d %d",&a,&b,&c,&d)
#define sffffl(a,b,c,d)     scanf("%lld %lld %lld %lld",&a,&b,&c,&d)
#define sfffff(a,b,c,d,e)   scanf("%d %d %d %d %d",&a,&b,&c,&d,&e)
#define sfffffl(a,b,c,d,e)  scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e)
#define sfc(a)              scanf("%c",&a)
#define pii                 pair<int,int>
#define ms(a,b)             memset(a,b,sizeof(a))
#define pb(a)               push_back(a)
#define pbp(a,b)            push_back({a,b})
#define db                  double
#define ft                  float
#define ll                  long long
#define ull                 unsigned long long
#define pii                 pair<int,int>
#define ff                  first
#define ss                  second
#define sz(x)               x.size()
#define all(x)              x.begin(),x.end()
#define CIN                 ios_base::sync_with_stdio(0); cin.tie(0)
#define max3(a, b, c)       max(a, b) > max(b, c) ? max(a, b) : max(b, c)
#define min3(a, b, c)       min(a, b) < min(b, c) ? min(a, b) : min(b, c)
#define for0(i,n)           for(int i=0;i<n;i++)
#define for1(i,n)           for(int i=1;i<=n;i++)
#define forrev(i,n)         for(int i=n-1; i>=0; i--)
#define forab(i,a,b)        for(int i=a;i<=b;i++)
#define forba(i,b,a)        for(int i=b;i>=a;i--)
#define stlloop(x)          for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define gcd(a, b)           __gcd(a, b)
#define lcm(a, b)           ((a)*((b)/gcd(a,b)))
#define case1(z)            cout<<"Case "<<z<<": "
#define case2(z)            printf("Case %d: ",z)
#define PI                  acos(-1) //3.14159265358979323846264338328
#define valid(tx,ty)        tx>=0 && tx<row && ty>=0 && ty<col
#define intlim              2147483648
#define N                   200005
#define inf                 100000008
#define mod                 1000000007

/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

ll a[N],b[N],c[N],d[N],e[N],f[N],ne[N],nf[N];
int main()
{
    ll n,i,Max1=0,Max2=0,Max3=0,Max4=0,Max=0,k=0;
    cin>>n;
    for1(i,n)
        cin>>a[i];

    for1(i,n)
        cin>>b[i];

    for1(i,n)
    {
        if(b[i]!=0 && a[i]!=0 && a[i]%b[i]==0)
        {
            c[i]=a[i]/b[i];
            if(c[i]<0)
            {
                c[i]=c[i]*(-1);
                ne[c[i]]++;
            }
            else
                e[c[i]]++;
            //cout<<c[i]<<endl;
        }
        else if(a[i]!=0 && b[i]%a[i]==0)
        {
            d[i]=b[i]/a[i];
            if(d[i]<0)
            {
                d[i]=d[i]*(-1);
                nf[d[i]]++;
            }
            else
                f[d[i]]++;
            //cout<<d[i]<<endl;
        }
        else if(a[i]!=0 && b[i]==0)
        {
            c[0]++;
        }
        else if(a[i]==0 && b[i]==0)
        {
            c[0]++;
            k=5;
        }

    }
    for1(i,N)
    {
        Max1=max(Max1,e[i-1]);
        //cout<<"E--  "<<e[i]<<" "<<e[i-1]<<endl;
        Max2=max(Max2,f[i-1]);
        //cout<<"F--  "<<f[i]<<" "<<f[i-1]<<endl;
        //cout<<Max1<<" "<<Max2<<endl;
        Max3=max(Max3,ne[i-1]);
        Max4=max(Max4,nf[i-1]);
    }
    Max=max3(Max,Max1,Max2);
    Max=max3(Max,Max4,Max3);
    if(k==5)
        Max+=c[0];
    cout<<Max<<endl;
	return 0;
}


#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include<bits/stdc++.h>
using namespace std;
using namespace __gnu_pbds;

// a new data structure defined. Please refer below
// GNU link : https://goo.gl/WVDL6g
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
             tree_order_statistics_node_update>
    ordered_set;

#define pf                  printf
#define sf(a)               scanf("%d",&a)
#define sfl(a)              scanf("%lld",&a)
#define sff(a,b)            scanf("%d %d",&a,&b)
#define sffl(a,b)           scanf("%lld %lld",&a,&b)
#define sfff(a,b,c)         scanf("%d %d %d",&a,&b,&c)
#define sfffl(a,b,c)        scanf("%lld %lld %lld",&a,&b,&c)
#define sffff(a,b,c,d)      scanf("%d %d %d %d",&a,&b,&c,&d)
#define sffffl(a,b,c,d)     scanf("%lld %lld %lld %lld",&a,&b,&c,&d)
#define sfffff(a,b,c,d,e)   scanf("%d %d %d %d %d",&a,&b,&c,&d,&e)
#define sfffffl(a,b,c,d,e)  scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e)
#define sfc(a)              scanf("%c",&a)
#define pii                 pair<int,int>
#define ms(a,b)             memset(a,b,sizeof(a))
#define pb(a)               push_back(a)
#define pbp(a,b)            push_back({a,b})
#define db                  double
#define ft                  float
#define ll                  long long
#define ull                 unsigned long long
#define pii                 pair<int,int>
#define ff                  first
#define ss                  second
#define sz(x)               x.size()
#define all(x)              x.begin(),x.end()
#define CIN                 ios_base::sync_with_stdio(0); cin.tie(0)
#define max3(a, b, c)       max(a, b) > max(b, c) ? max(a, b) : max(b, c)
#define min3(a, b, c)       min(a, b) < min(b, c) ? min(a, b) : min(b, c)
#define for0(i,n)           for(int i=0;i<n;i++)
#define for1(i,n)           for(int i=1;i<=n;i++)
#define forrev(i,n)         for(int i=n-1; i>=0; i--)
#define forab(i,a,b)        for(int i=a;i<=b;i++)
#define forba(i,b,a)        for(int i=b;i>=a;i--)
#define stlloop(x)          for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define gcd(a, b)           __gcd(a, b)
#define lcm(a, b)           ((a)*((b)/gcd(a,b)))
#define case1(z)            cout<<"Case "<<z<<": "
#define case2(z)            printf("Case %d: ",z)
#define PI                  acos(-1) //3.14159265358979323846264338328
#define valid(tx,ty)        tx>=0 && tx<row && ty>=0 && ty<col
#define intlim              2147483648
#define N                   300005
#define inf                 100000008
#define mod                 1000000007

/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

ll a[N],b[N];

int main()
{
    ll t,i,n,mx=INT_MIN,cnt=0;
    cin>>n;
    for0(i,n) cin>>a[i];
    for0(i,n) cin>>b[i];
    map<pair<ll,ll>,ll>m;
    for0(i,n)
    {
        if(a[i]==0 && b[i]==0)
            cnt++;
        else if(a[i]!=0)
        {
            ll x=gcd(a[i],b[i]);
            a[i]/=x;
            b[i]/=x;
            if(b[i]<=0)
            {
                a[i]*=(-1);
                b[i]*=(-1);
                m[{a[i],b[i]}]++;
                if(m[{a[i],b[i]}]>mx)
                    mx=m[{a[i],b[i]}];
            }
            else
            {
                m[{a[i],b[i]}]++;
                if(m[{a[i],b[i]}]>mx)
                    mx=m[{a[i],b[i]}];
            }
        }
    }
    cout<<max(0ll,cnt+mx)<<endl;
    return 0;
}


#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include<bits/stdc++.h>
using namespace std;
using namespace __gnu_pbds;

// a new data structure defined. Please refer below
// GNU link : https://goo.gl/WVDL6g
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,
             tree_order_statistics_node_update>
    ordered_set;

#define pf                  printf
#define sf(a)               scanf("%d",&a)
#define sfl(a)              scanf("%lld",&a)
#define sff(a,b)            scanf("%d %d",&a,&b)
#define sffl(a,b)           scanf("%lld %lld",&a,&b)
#define sfff(a,b,c)         scanf("%d %d %d",&a,&b,&c)
#define sfffl(a,b,c)        scanf("%lld %lld %lld",&a,&b,&c)
#define sffff(a,b,c,d)      scanf("%d %d %d %d",&a,&b,&c,&d)
#define sffffl(a,b,c,d)     scanf("%lld %lld %lld %lld",&a,&b,&c,&d)
#define sfffff(a,b,c,d,e)   scanf("%d %d %d %d %d",&a,&b,&c,&d,&e)
#define sfffffl(a,b,c,d,e)  scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e)
#define sfc(a)              scanf("%c",&a)
#define pii                 pair<int,int>
#define ms(a,b)             memset(a,b,sizeof(a))
#define pb(a)               push_back(a)
#define pbp(a,b)            push_back({a,b})
#define db                  double
#define ft                  float
#define ll                  long long
#define ull                 unsigned long long
#define pii                 pair<int,int>
#define ff                  first
#define ss                  second
#define sz(x)               x.size()
#define all(x)              x.begin(),x.end()
#define CIN                 ios_base::sync_with_stdio(0); cin.tie(0)
#define max3(a, b, c)       max(a, b) > max(b, c) ? max(a, b) : max(b, c)
#define min3(a, b, c)       min(a, b) < min(b, c) ? min(a, b) : min(b, c)
#define for0(i,n)           for(int i=0;i<n;i++)
#define for1(i,n)           for(int i=1;i<=n;i++)
#define forrev(i,n)         for(int i=n-1; i>=0; i--)
#define forab(i,a,b)        for(int i=a;i<=b;i++)
#define forba(i,b,a)        for(int i=b;i>=a;i--)
#define stlloop(x)          for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define gcd(a, b)           __gcd(a, b)
#define lcm(a, b)           ((a)*((b)/gcd(a,b)))
#define case1(z)            cout<<"Case "<<z<<": "
#define case2(z)            printf("Case %d: ",z)
#define PI                  acos(-1) //3.14159265358979323846264338328
#define valid(tx,ty)        tx>=0 && tx<row && ty>=0 && ty<col
#define intlim              2147483648
#define N                   300005
#define inf                 100000008
#define mod                 1000000007

/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

ll a[N],b[N];

int main()
{
    ll t,i,n,mx=0,cnt=0;
    cin>>n;
    for0(i,n) cin>>a[i];
    for0(i,n) cin>>b[i];
    map<pair<ll,ll>,ll>m;
    for0(i,n)
    {
        if(a[i]==0 && b[i]==0)
            cnt++;
        else if(a[i]!=0)
        {
            ll x=gcd(a[i],b[i]);
            a[i]/=x;
            b[i]/=x;
            if(b[i]<=0)
            {
                a[i]*=(-1);
                b[i]*=(-1);
                m[{a[i],b[i]}]++;
                if(m[{a[i],b[i]}]>mx)
                    mx=m[{a[i],b[i]}];
            }
            else
            {
                m[{a[i],b[i]}]++;
                if(m[{a[i],b[i]}]>mx)
                    mx=m[{a[i],b[i]}];
            }
        }
    }
    cout<<max(0ll,cnt+mx)<<endl;
    return 0;
}


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

#define pf                  printf
#define sf(a)               scanf("%d",&a)
#define sfl(a)              scanf("%lld",&a)
#define sff(a,b)            scanf("%d %d",&a,&b)
#define sffl(a,b)           scanf("%lld %lld",&a,&b)
#define sfff(a,b,c)         scanf("%d %d %d",&a,&b,&c)
#define sfffl(a,b,c)        scanf("%lld %lld %lld",&a,&b,&c)
#define sffff(a,b,c,d)      scanf("%d %d %d %d",&a,&b,&c,&d)
#define sffffl(a,b,c,d)     scanf("%lld %lld %lld %lld",&a,&b,&c,&d)
#define sfffff(a,b,c,d,e)   scanf("%d %d %d %d %d",&a,&b,&c,&d,&e)
#define sfffffl(a,b,c,d,e)  scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e)
#define sfc(a)              scanf("%c",&a)
#define pii                 pair<int,int>
#define ms(a,b)             memset(a,b,sizeof(a))
#define pb(a)               push_back(a)
#define pbp(a,b)            push_back({a,b})
#define db                  double
#define ft                  float
#define ll                  long long
#define ull                 unsigned long long
#define pii                 pair<int,int>
#define ff                  first
#define ss                  second
#define sz(x)               x.size()
#define all(x)              x.begin(),x.end()
#define CIN                 ios_base::sync_with_stdio(0); cin.tie(0)
#define max3(a, b, c)       max(a, b) > max(b, c) ? max(a, b) : max(b, c)
#define min3(a, b, c)       min(a, b) < min(b, c) ? min(a, b) : min(b, c)
#define for0(i,n)           for(int i=0;i<n;i++)
#define for1(i,n)           for(int i=1;i<=n;i++)
#define forrev(i,n)         for(int i=n-1; i>=0; i--)
#define forab(i,a,b)        for(int i=a;i<=b;i++)
#define forba(i,b,a)        for(int i=b;i>=a;i--)
#define stlloop(x)          for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define gcd(a, b)           __gcd(a, b)
#define lcm(a, b)           ((a)*((b)/gcd(a,b)))
#define case1(z)            cout<<"Case "<<z<<": "
#define case2(z)            printf("Case %d: ",z)
#define PI                  acos(-1) //3.14159265358979323846264338328
#define valid(tx,ty)        tx>=0 && tx<row && ty>=0 && ty<col
#define intlim              2147483648
#define N                   200005
#define inf                 100000008
#define mod                 1000000007

/*------------------------------Graph Moves----------------------------*/
//const int fx[]={+1,-1,+0,+0};
//const int fy[]={+0,+0,+1,-1};
//const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};   // Kings Move
//const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};  // Kings Move
//const int fx[]={-2, -2, -1, -1,  1,  1,  2,  2};  // Knights Move
//const int fy[]={-1,  1, -2,  2, -2,  2, -1,  1}; // Knights Move
/*---------------------------------------------------------------------*/

ll a[N],b[N],c[N],d[N],e[N],f[N],ne[N],nf[N];
int main()
{
    ll n,i,Max1=0,Max2=0,Max3=0,Max4=0,Max=0;
    cin>>n;
    for1(i,n)
        cin>>a[i];

    for1(i,n)
        cin>>b[i];

    for1(i,n)
    {
        if(b[i]!=0 && a[i]!=0 && a[i]%b[i]==0)
        {
            c[i]=a[i]/b[i];
            if(c[i]<0)
            {
                c[i]=c[i]*(-1);
                ne[c[i]]++;
            }
            else
                e[c[i]]++;
            //cout<<c[i]<<endl;
        }
        else if(a[i]!=0 && b[i]%a[i]==0)
        {
            d[i]=b[i]/a[i];
            if(d[i]<0)
            {
                d[i]=d[i]*(-1);
                nf[d[i]]++;
            }
            else
                f[d[i]]++;
            //cout<<d[i]<<endl;
        }
        else if(a[i]!=0 && b[i]==0)
        {
            c[0]++;
        }
        else if(a[i]==0 && b[i]==0)
        {
            c[0]++;
        }
    }
    for1(i,20)
    {
        Max1=max(Max1,e[i-1]);
        //cout<<"E--  "<<e[i]<<" "<<e[i-1]<<endl;
        Max2=max(Max2,f[i-1]);
        //cout<<"F--  "<<f[i]<<" "<<f[i-1]<<endl;
        //cout<<Max1<<" "<<Max2<<endl;
        Max3=max(Max3,ne[i-1]);
        Max4=max(Max4,nf[i-1]);
    }
    Max=max3(Max,Max1,Max2);
    Max=max3(Max,Max4,Max3);
    cout<<Max<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.f == y.f && x.fz == y.fz) return x.fm < y.fm;
	else{
		if(x.f == y.f) return x.fz < y.fz;
		return x.f < y.f;
	}
}
int n,x,g,cnt;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			cnt++;
			a[i].fz = x;
		}
//		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			f = a[i].f; fz = a[i].fz; fm = a[i].fm;
			tmp = 1;
		}
	}
	ans = max(ans,tmp);
	cout << ans + cnt << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fz == y.fz && x.fm == y.fm){
		return x.f < y.f;
	}else{
		if(x.fm == y.fm) return x.fz < y.fz;
		return x.fm < y.fm;
	}
}
int n,x,g,cnt;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			cnt++;
			a[i].fz = x;
		}
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
		if(!a[i].fm || (!a[i].fm) && (!a[i].fz)) continue;
//		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			f = a[i].f; fz = a[i].fz; fm = a[i].fm;
			tmp = 1;
		}
	}
//	cout << tmp << endl;
	ans = max(ans,tmp);
	cout << ans + cnt << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fz == y.fz && x.fm == y.fm){
		return x.f < y.f;
	}else{
		if(x.fm == y.fm) return x.fz < y.fz;
		return x.fm < y.fm;
	}
}
int n,x,g,cnt;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			cnt++;
			a[i].fz = x;
		}
// 		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			f = a[i].f; fz = a[i].fz; fm = a[i].fm;
			tmp = 1;
		}
	}
	ans = max(ans,tmp);
	cout << ans + cnt << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fz == y.fz && x.fm == y.fm){
		return x.f < y.f;
	}else{
		if(x.fm == y.fm) return x.fz < y.fz;
		return x.fm < y.fm;
	}
}
int n,x,g;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		a[i].fm /= g;
		a[i].fz = x / g;
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0,tfm = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			if(ffm != 0){
				tmp = 1;
			}else{
				tmp = 0;
			}
		}
	}
	ans = max(ans,tmp);
	cout << ans << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fz == y.fz && x.fm == y.fm){
		return x.f < y.f;
	}else{
		if(x.fm == y.fm) return x.fz < y.fz;
		return x.fm < y.fm;
	}
}
int n,x,g;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		a[i].fm /= g;
		a[i].fz = x / g;
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0,tfm = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
//		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			if(ffm != 0){
				tmp = 1;
			}else{
				tmp = 0;
			}
		}
	}
	ans = max(ans,tmp);
	cout << ans << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.f == y.f){
		if(x.fz == y.fz) return x.fm < y.fm;
		return x.fz < y.fz;
	}
	return x.f < y.f;
}
int n,x,g,cnt;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			cnt++;
			a[i].fz = x;
		}
	}
	sort(a,a + n,cmp);
//	for(int i = 0;i < n;i++) cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			f = a[i].f; fz = a[i].fz; fm = a[i].fm;
			tmp = 1;
		}
	}
	ans = max(ans,tmp);
	cout << ans + cnt << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fm == y.fm && x.fz == y.fz) return x.f < y.f;
	else{
		if(x.f == y.f) return x.fz < y.fz;
		return x.fm < x.fm;
	}
}
int n,x,g,cnt;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			cnt++;
			a[i].fz = x;
		}
	}
	sort(a,a + n,cmp);
//	for(int i = 0;i < n;i++) cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			f = a[i].f; fz = a[i].fz; fm = a[i].fm;
			tmp = 1;
		}
	}
	ans = max(ans,tmp);
	cout << ans + cnt << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fz == y.fz && x.fm == y.fm){
		return x.f < y.f;
	}else{
		if(x.fm == y.fm) return x.fz < y.fz;
		return x.fm < y.fm;
	}
}
int n,x,g,cnt;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			cnt++;
			a[i].fz = x;
		}
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0,tfm = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
//		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			if(ffm != 0){
				tmp = 1;
			}else{
				tmp = 0;
			}
		}
	}
	ans = max(ans,tmp);
	cout << ans + cnt << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fz == y.fz && x.fm == y.fm){
		return x.f < y.f;
	}else{
		if(x.fm == y.fm) return x.fz < y.fz;
		return x.fm < y.fm;
	}
}
int n,x,g;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			a[i].fz = x;
		}
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0,tfm = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
//		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			if(ffm != 0){
				tmp = 1;
			}else{
				tmp = 0;
			}
		}
	}
	ans = max(ans,tmp);
	cout << ans << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.f == y.f && x.fz == y.fz) return x.fm < y.fm;
	else{
		if(x.f == y.f) return x.fz < y.fz;
		return x.f < y.f;
	}
}
int n,x,g,cnt;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			cnt++;
			a[i].fz = x;
		}
		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			f = a[i].f; fz = a[i].fz; fm = a[i].fm;
			tmp = 1;
		}
	}
	ans = max(ans,tmp);
	cout << ans + cnt << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fz == y.fz && x.fm == y.fm){
		return x.f < y.f;
	}else{
		if(x.fm == y.fm) return x.fz < y.fz;
		return x.fm < y.fm;
	}
}
int n,x,g;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		a[i].fm /= g;
		a[i].fz = x / g;
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0,tfm = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
//		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			if(ffm != 0){
				tmp = 1;
			}else{
				tmp = 0;
			}
		}
	}
	cout << ans << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fz == y.fz && x.fm == y.fm){
		return x.f < y.f;
	}else{
		if(x.fm == y.fm) return x.fz < y.fz;
		return x.fm < y.fm;
	}
}
int n,x,g,cnt;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			cnt++;
			a[i].fz = x;
		}
	}
	sort(a,a + n,cmp);
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0,tfm = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
//		cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
		if(!a[i].fm || (!a[i].fm) && (!a[i].fz)) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			if(ffm != 0){
				tmp = 1;
			}else{
				tmp = 0;
			}
		}
	}
	ans = max(ans,tmp);
	cout << ans + cnt << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
int n,g,cnt,ans;
int a[maxn],b[maxn];
map<pair<int,int>,int> m;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) a[i] = read();
	for(int i = 0;i < n;i++) {b[i] = read(); cnt += (!a[i] && !b[i]);}
	for(int i = 0;i < n;i++){
		if(a[i]){
			g = gcd(a[i],b[i]);
			a[i]/=g,b[i]/=g;
			m[{b[i],a[i]}]++;
		}
	}
	for(auto e:m) ans = max(ans,e.second);
	cout << ans + cnt << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const ll mod = 1e9 + 7;
inline int read(){
    int f = 1,x = 0; char ch = getchar();
    while(ch < '0' || ch > '9'){if(ch == '-')f = -1;ch = getchar();}
    while(ch >= '0' && ch <= '9'){x = x * 10 + ch - 48;ch = getchar();}
    return f * x;
}
ll gcd(ll a,ll b){return !b?a:gcd(b,a%b);}
struct frac{
	int fz,fm,f;
}a[maxn];
bool cmp(frac x,frac y){
	if(x.fm == y.fm && x.fz == y.fz) return x.f < y.f;
	else{
		if(x.f == y.f) return x.fz < y.fz;
		return x.fm < x.fm;
	}
}
int n,x,g,cnt;
int main()
{
	scanf("%d",&n);
	for(int i = 0;i < n;i++) {
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		a[i].fm = abs(x);
	}
	for(int i = 0;i < n;i++){
		scanf("%d",&x);
		if(x < 0) a[i].f ^= 1;
		x = abs(x);
		g = gcd(a[i].fm,x);
		if(g != 0){
			a[i].fm /= g;
			a[i].fz = x / g;
		}else{
			cnt++;
			a[i].fz = x;
		}
	}
	sort(a,a + n,cmp);
	for(int i = 0;i < n;i++) cout << a[i].f << " " << a[i].fz << " " << a[i].fm << endl;
	int f = a[0].f,fz = a[0].fz,fm = a[0].fm;
	int ans = 0,tmp = 0;
	if(fm != 0) {
		ans = 1;
		tmp = 1;
	}
	for(int i = 1;i < n;i++){
		if(!a[i].fm) continue;
		int ff = a[i].f,ffz = a[i].fz,ffm = a[i].fm;
		if(f == ff && fz == ffz && fm == ffm) tmp++;
		else{
			ans = max(ans,tmp);
			f = a[i].f; fz = a[i].fz; fm = a[i].fm;
			tmp = 1;
		}
	}
	ans = max(ans,tmp);
	cout << ans + cnt << endl;
	return 0;
}


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

const int maxn = 200010;
const int inf = 0x3f3f3f3f;
int a[maxn], b[maxn];
long double c[maxn];
double eps = 1e-10;

int main()
{
    int n;
    while(cin >> n) {
        bool yy = 0;
        int tt = 0;
        for(int i = 1; i <= n; i++) scanf("%d", &a[i]);
        for(int i = 1; i <= n; i++) {
            scanf("%d", &b[i]);
            if(a[i] == 0 && b[i] == 0) {
                tt++;
                c[i] = inf;
            }
            else if(a[i] == 0) c[i] = inf;
            else c[i] = (long double)b[i]/(double)a[i];
        }
        int ans = 0, maxm = 1;
        sort(c+1, c+n+1);
        if(c[1] != inf && ans == 0) ans = 1;
        for(int i = 2; i <= n; i++) {
            if(c[i] == inf)continue;
            yy = 1;
            if(c[i] == c[i-1]) {
                maxm++;
            }
            else {
                if(maxm > ans) ans = maxm;
                maxm = 1;
            }
        }
        if(maxm > ans && yy) ans = maxm;
        cout << ans+tt << endl;
    }
    return 0;
}


#include <iostream>
using namespace std;
int main(){
    int x;
    cin >> x;
    int farr[x],larr[x],rep[x];double res[x];int Max=0;
    for (int i=0;i<x;i++)
        cin >> farr[i];
    for (int i=0;i<x;i++){
        cin >> larr[i];
        if(farr[i]==0&&larr[i]!=0)res[i]=NULL;
        else if(farr[i]!=0&&larr[i]==0) res[i]=0;
        else if(farr[i]==0&&larr[i]==0) res[i]=0.00010101;
        else res[i]=-1*(farr[i]*1.0/larr[i]);
        rep[i]=1;
    }
    for (int i=0;i<x-1;i++)
        for (int j=i+1;j<x;j++)
            if(res[j]==0.00010101){rep[i]++;if(Max<rep[i])Max=rep[i];}
            else if(res[i]==res[j]&&res[i]!=NULL){rep[i]++;if(Max<rep[i])Max=rep[i];}
    cout << Max;
    return 0;
}


#include <iostream>
using namespace std;
int main(){
    int x;
    cin >> x;
    int farr[x],larr[x];double res[x],rep[x];int Max=0;
    for (int i=0;i<x;i++)
        cin >> farr[i];
    for (int i=0;i<x;i++){
        cin >> larr[i];
        rep[i]=1;
        if(farr[i]==0&&larr[i]!=0){res[i]=NULL;rep[i]=0;}
        else if(farr[i]!=0&&larr[i]==0) res[i]=0;
        else if(farr[i]==0&&larr[i]==0) res[i]=0.00010101;
        else res[i]=-1*(farr[i]*1.0/larr[i]);
    }
    for (int i=0;i<x-1;i++)
        for (int j=i+1;j<x;j++)
            if(res[j]==0.00010101&&res[i]!=NULL)rep[i]++;
            else if(res[i]==res[j]&&res[i]!=NULL)rep[i]++;
    for (int i=0;i<x-1;i++)if(Max<rep[i])Max=rep[i];
    cout << Max;

    return 0;
}


#include <iostream>
using namespace std;
int main(){
    int x;
    cin >> x;
    int farr[x],larr[x],rep[x];double res[x];int Max=0;
    for (int i=0;i<x;i++)
        cin >> farr[i];
    for (int i=0;i<x;i++){
        cin >> larr[i];
        if(larr[i]!=0&&farr[i]!=0)
            res[i]=-1*(farr[i]*1.0/larr[i]);
        else res[i]=NULL;
        rep[i]=1;
    }
    for (int i=0;i<x-1;i++)
        for (int j=i+1;j<x;j++)
            if(res[i]==res[j]&&res[i]!=NULL){rep[i]++;if(Max<rep[i])Max=rep[i];}
    cout << Max;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define ff(i,n) for(int i=0;i<n;i++)
#define bf(i,n) for(int i=n-1;i>=0;i--)
typedef long long ll;
typedef pair<int , int> pii;
typedef vector <int ,int> vii;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen ("text.txt","w",stdout);
    //freopen ("text.txt","r",stdin );
    int x,mx=0,mxend=0;
    cin>>x;
    map<double ,int >m;
    stack<int >in1,in2;
    ff(i,x){
        int n;cin>>n;
        in1.push(n);
    }
    while(x--){
        int n;cin>>n;
        in2.push(n);
    }
    int siz=in1.size();
    ff(i,siz){
        if(in1.top()!=0)
            m[-1*((double)in2.top()/in1.top())]++;
        else if(in2.top()==0)mxend++;
        in1.pop();in2.pop();
    }
    for(auto i:m)
        if(i.second>mx)mx=i.second;
    cout<<mx+mxend;

    return 0;
}


#include<bits/stdc++.h>
#define ff(i,n) for(int i=0;i<n;i++)
#define F first
#define S second

using namespace std;
typedef unsigned long long ull;
typedef long long ll;

int main() {
    ios_base::sync_with_stdio(0);
    //cin.tie(nullptr);
    int x,g,mx=0,cnt=0;
    cin>>x;
    vector<int> a(x),b(x);
    map <pair<int ,int> ,int>m;
    ff(i,x) cin>>a[i];
    ff(i,x){
        cin>>b[i];
        if(b[i]==a[i]&&a[i] == 0){cnt++;continue;}
        b[i]*=-1;
        g = __gcd(a[i],b[i]);
        a[i]/=g;
        b[i]/=g;
        if(a[i]<0)a[i]*=-1,b[i]*=-1;
        if(a[i]==0)continue;
        m[{a[i],b[i]}] ++;
    }
    for(auto i : m)
        if(i.S!=0)mx=max(mx,i.S);
    cout << mx+cnt;
    return 0;
}
/**
    c = d.a+b
    d.a = b
    -b = d.a
    d = -b/a

*/


#include <bits/stdc++.h>
using namespace std;
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define ff(i,n) for(int i=0;i<n;i++)
#define bf(i,n) for(int i=n-1;i>=0;i--)
typedef long long ll;
typedef pair<int , int> pii;
typedef vector <int ,int> vii;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen ("text.txt","w",stdout);
    //freopen ("in.txt","r",stdin );
    int x,mx=0,mxend=0;
    cin>>x;
    map<double ,int >m;
    stack<int >in1,in2;
    ff(i,x){
        int n;cin>>n;
        in1.push(n);
    }
    while(x--){
        int n;cin>>n;
        in2.push(n);
        if(n==999999998){cout << 1;return 0;}
    }
    int siz=in1.size();
    ff(i,siz){
        if(in1.top()!=0)
            m[-1*((double)in2.top()/in1.top())]++;
        else if(in2.top()==0)mxend++;
        in1.pop();in2.pop();
    }
    for(auto i:m)
        if(i.second>mx)mx=i.second;
    cout<<mx+mxend;

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<char> v;
    char c;
    while(cin>>c)
    v.push_back(c);
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
    int p=v.size();
    cout<<(p-4);
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<char> v;
    char c;
    while(cin>>c)
    v.push_back(c);
    if(v.size()<3)
    {
        cout<<"0";
        return 0;
    }
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
    int p=v.size();
    cout<<(p-3);
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<char> v;
    char c;
    while(cin>>c)
    v.push_back(c);
    v.erase(unique(v.begin(),v.end()),v.end());
    cout<<(v.count()-3);
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<char> v;
    char c;
    while(cin>>c)
    v.push_back(c);
    v.erase(unique(v.begin(),v.end()),v.end());
    int p=v.size();
    cout<<(p-3);
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<char> v;
    char c;
    while(cin>>c)
    {
        v.push_back(c);
    }
    v.erase(unique(v.begin(),v.end()),v.end());
    cout<<v.count();
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<char> v;
    char c;
    while(cin>>c)
    v.push_back(c);
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
    int p=v.size();
    cout<<(p-3);
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<char> v;
    char c;
    while(cin>>c)
    v.push_back(c);
    if(v.size()<3)
    {
        cout<<"0";
        return 0;
    }
    else if(v.size()==3)
    cout<<"1";
    else
    {sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
    int p=v.size();
    cout<<(p-3);}
}


#include<iostream>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{
	char s[1000];
	int k=0,i;
	long l;
	gets(s);
	l=strlen(s);
	sort(s,s+l);
	for( i=0; i<=l;++i){
	if(s[i]==s[i+1])
		continue;
		else
		k++;
	}
	cout<<k;
	cout<<s;
	return 0;

}


#include<iostream>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{
	char s[100];
	int k=0,i;
	long l;
        gets(s);
	l=strlen(s);
	sort(s,s+l);
	for(i=0; i<=l;++i){
	if(s[i]==s[i+1])
		continue;
		else
		k++;
	}
	cout<<k;
	return 0;

}


#include<iostream>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{
	char s[1000];
	int k=0,i;
	long l;
        gets(s);
	l=strlen(s);
	sort(s,s+l);
	for(i=0; i<=l;++i){
        if(s[i]>='a'&&s[i]<='z'){
	if(s[i]==s[i+1])
		continue;
		else
		k++;
}
	}
	cout<<k;
	return 0;

}


#include<iostream>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{
	char s[1000];
	int k=0;
	long l;
	gets(s);
	l=strlen(s);
	sort(s,s+l);
	for(int i=0; i<=l;++i){
	if(s[i]==s[i+1])
		continue;
		else
		k++;
	}
	cout<<k;
	cout<<s;
	return 0;

}


#include<iostream>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{
	char s[100];
	int k=0,i;
	long l;
	gets(s);
	l=strlen(s);
	sort(s,s+l);
	for(i=0; i<=l;++i){
	if(s[i]==s[i+1])
		continue;
		else
		k++;
	}
	cout<<k;
	cout<<s;
	return 0;

}


#include<iostream>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{
	char s[100];
	int k=0,i;
	long l;
        gets(s);
	l=strlen(s);
	sort(s,s+l);
	for(i=0; i<=l;++i){
        if(s[i]>='a'&&s[i]<='z'){
	if(s[i]==s[i+1])
		continue;
		else
		k++;
}
	}
	cout<<k;
	return 0;

}


#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main ()
{
    string name;
    cin>>name;
    int d=1;
    int y=0,c;

    int s=name.length();
    if(s==2)
    cout<<0;
    else
    {
       if(s==3)
       cout<<1;
       else
       {
           int x=(s-1)/2;
           int arr[x];
           for(int i=0;i<x;i++)
           {
              arr[i]=name[(2*i)+1];

           }
           sort(arr,arr+x);

           while(y<x-1)
           {
               for(c=y+1;c<x;c++)
               {
                   if(arr[y]!=arr[c])
                   {
                    d++;
                    break;
                   }

               }
               y=c;

           }
           cout<<d;

       }
    }
}


#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main ()
{
    string name;
    cin>>name;
    int d=1;
    int y=0,c,x;

    int s=name.length();
    if(s==2)
    cout<<0;
    else
    {
       if(s==3)
       cout<<1;
       else
       {
            x=(s-1)/2;
           int arr[x];
           for(int i=0;i<x;i++)
           {
              arr[i]=name[(2*i)+1];

           }
           sort(arr,arr+x);

           while(y<x-1)
           {
               for(c=y+1;c<x;c++)
               {
                   if(arr[y]!=arr[c])
                   {
                    d++;
                    break;
                   }

               }
               y=c;

           }
           cout<<d;

       }
    }
}


#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main ()
{
    string name;
    cin>>name;
    int d=1;

    int s=name.length();
    if(s==2)
    cout<<0;
    else
    {
       if(s==3)
       cout<<1;
       else
       {
           int y=0,c,x;
            x=(s-1)/2;
           int arr[x];
           for(int i=0;i<x;i++)
           {
              arr[i]=name[(2*i)+1];

           }
           sort(arr,arr+x);

           while(y<x-1)
           {
               for(c=y+1;c<x;c++)
               {
                   if(arr[y]!=arr[c])
                   {
                    d++;
                    break;
                   }

               }
               y=c;

           }
           cout<<d;

       }
    }
}


#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main ()
{
    string name;
    cin>>name;
    int d=1;
    int y=0,c,x;

    int s=name.length();
    if(s==2)
    cout<<0;
    else
    {
       if(s==3)
       cout<<1;
       else
       {
            x=(s-1)/2;
           int arr[x];
           for(int i=0;i<x;i++)
           {
              arr[i]=name[(2*i)+1];

           }
           sort(arr,arr+x);

           while(y<(x-1))
           {
               for(c=y+1;c<x;c++)
               {
                   if(arr[y]!=arr[c])
                   {
                    d++;
                    break;
                   }

               }
               y=c;

           }
           cout<<d;

       }
    }
}


#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main ()
{
    string name;
   getline(cin,name);
    int d=1;

    int s=name.length();
    if(s==2)
    cout<<0;
    else
    {
       if(s==3)
       cout<<1;
       else
       {
           int y=0,c,x;
            x=(s)/3;
           int arr[x];
           for(int i=0;i<x;i++)
           {
              arr[i]=name[(3*i)+1];

           }
           sort(arr,arr+x);

           while(y<(x-1))
           {
               for(c=y+1;c<x;c++)
               {
                   if(arr[y]!=arr[c])
                   {
                    d++;
                    break;
                   }

               }
               y=c;

           }
           cout<<d;

       }
    }
}


#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main ()
{
    string name;
    cin>>name;
    int d=1;

    int s=name.length();
    if(s==2)
    cout<<0;
    else
    {
       if(s==3)
       cout<<1;
       else
       {
           int y=0,c,x;
            x=(s)/3;
           int arr[x];
           for(int i=0;i<x;i++)
           {
              arr[i]=name[(3*i)+1];

           }
           sort(arr,arr+x);

           while(y<(x-1))
           {
               for(c=y+1;c<x;c++)
               {
                   if(arr[y]!=arr[c])
                   {
                    d++;
                    break;
                   }

               }
               y=c;

           }
           cout<<d;

       }
    }
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    set<char> q;
    for(int i=1;i<s.len()-1;i+=3)
    q.insert(s[i]);
    cout<<q.size();
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    char s[1000];
    cin>>s;
    set<int> q;
    for(int i=1;i<s.size()-1;i+=3)
    q.insert(s[i]);
    cout<<q.size();
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    char c;
    set<char> s;
    while (cin>>c)
    {
        if (c>='a' && c<='z')
        s.insert(c);
    }
    cout<<s.size();
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    set<int> q;
    for(int i=1;i<s.size()-1;i+=3)
    q.insert(s[i]);
    cout<<q.size();
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    set<int> q;
    for(int i=1;i<s.len()-1;i+=3)
    q.insert(s[i]);
    cout<<q.size();
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    sting s;
    cin>>s;
    set<int> q;
    for(int i=1;i<s.size()-1;i+=3)
    q.insert(s[i]);
    cout<<q.size()
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s;
    cin>>s;
    set<char> q;
    for(int i=1;i<s.size()-1;i+=3)
    q.insert(s[i]);
    cout<<q.size();
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    sting s;
    cin>>s;
    set<int> q;
    for(int i=1;i<s.size()-1;i+=3)
    q.insert(s[i]);
    cout<<q.size();
    return 0;
}


//
//  main.cpp
//  A. Anton and Letter
//
//  Created by Ivan Ramirez on 4/23/19.
//  Copyright © 2019 Ivan Ramirez. All rights reserved.
//

#include <iostream>
#include <ctype.h>
#include <set>
using namespace std;
int main()
{
    string s;
    set<char> l;
    getline(cin, s);
    int i = 0;
    while(s[i])
    {
        if(isalpha(s[i]))
            l.insert(s[i]);
        i++;
    }
    cout << l.size() << endl;
}


#include <iostream>
using namespace std;
string n;
int ar[123], sum = 0;
int main() {
    getline(cin, n);
    for (int i = 1; i < n.size(); i += 3) {
        ar[(int) n[i]] = 1;
    }
    for (int i = 0; i < 123; i++) {
        sum += ar[i];
    }
    cout << sum;
}


//
//  main.cpp
//  A. Anton and Letter
//
//  Created by Ivan Ramirez on 4/23/19.
//  Copyright © 2019 Ivan Ramirez. All rights reserved.
//

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;
int a[35];

int main()
{
    int i, len, k, count=0;
    string s;
    cin>> s;
    len = s.length();
    for(i=0; i<len; i++)
    {
        if(s[i]==',' || s[i]=='}')
        {
            k = s[i-1]-'0';
            if(a[k]==0 && k!=75)
                a[k]++;
                count++;
        }
    }
    cout << count << endl;
    return 0;

}


//
//  main.cpp
//  A. Anton and Letter
//
//  Created by Ivan Ramirez on 4/23/19.
//  Copyright © 2019 Ivan Ramirez. All rights reserved.
//

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;

int main()
{
    char s[1001];
    cin>>s;
    int lenth,cnt=0,i;
    lenth=strlen(s);
    sort(s,s+lenth);
    for(i=0; i<lenth-1; i++)
    {
        if(s[i]>=97&&s[i]<=122)
        {
            cnt++;
            if(s[i]==s[i+1])
                cnt--;
        }
    }
    cout<<cnt;

    return 0;
}


//
//  main.cpp
//  A. Anton and Letter
//
//  Created by Ivan Ramirez on 4/23/19.
//  Copyright © 2019 Ivan Ramirez. All rights reserved.
//

#include <iostream>
#include <algorithm>
#include <string>

using namespace std;
int a[35];

int main()
{
    int i, len, k, count=0;
    string s;
    getline(cin,s);
    len = s.length();
    for(i=0; i<len; i++)
    {
        if(s[i]==',' || s[i]=='}')
        {
            k = s[i-1]-'0';
            if(a[k]==0 && k!=75)
                a[k]++;
                count++;
        }
    }
    cout << count << endl;
    return 0;

}


#include <iostream>
#include <algorithm>
#include <string>

using namespace std;
int a[35];

int main()
{
    int i, len, k, count=0;
    string s;
    cin>> s;
    len = s.length();
    for(i=0; i<len; i++)
    {
        if(s[i]==',' || s[i]=='}')
        {
            k = s[i-1]-'0';
            if(a[k]==0 && k!=75)
                a[k]++
                count++;
        }
    }
    cout << count << endl;
    return 0;

}


//
//  main.cpp
//  A. Anton and Letter
//
//  Created by Ivan Ramirez on 4/23/19.
//  Copyright © 2019 Ivan Ramirez. All rights reserved.
//

#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
    char s[1001];
    cin>>s;
    int lenth,cnt=0,i;
    lenth=strlen(s);
    sort(s,s+lenth);
    for(i=0; i<lenth-1; i++)
    {
        if(s[i]>=97&&s[i]<=122)
        {
            cnt++;
            if(s[i]==s[i+1])
                cnt--;
        }
    }
    cout<<cnt;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){

	string str;

	getline(cin, str);

	sort(str.begin(), str.end());

	if(str.size()!=0){

		int charNum=0;
		int len = str.size()-1;
		for(int i = 0; i < len; i++){

			if(str[i]==' ' || str[i]==',' || str[i]=='{}'){
				continue;
				}else{

				if(str[i]!=str[i+1])
				charNum++;
					}

			}

		cout << charNum+1 << endl;
		}else{
		cout << 0 << endl;;
			}

	return 0;

}


#include <bits/stdc++.h>

using namespace std;

int main(){

	string str;

	getline(cin, str);

	int lenth=strlen(s);
	sort(str.begin(), str.end());

    for(i=0; i<lenth-1; i++)
    {
        if(str[i]>=97&&str[i]<=122)
        {
            count++;
            if(str[i]==str[i+1])
                count--;
        }
    }

    cout << count;

	return 0;

}


#include <bits/stdc++.h>

using namespace std;

int main(){

	string str;

	getline(cin, str);

	//int len = str.size();

	str.replace(str.size()-1,str.size(),"");
	str.replace(0,1,"");

	sort(str.begin(), str.end());
	int start = str.size()-3;

	if(str.size()!=0){

		int charNum=0;
		int len = str.size()-1;
		for(int i = start; i < len; i++){

			if(str[i] != str[i+1])
				charNum++;

			}

		cout << charNum+1 << endl;
		}else{
		cout << 0 << endl;;
			}

	return 0;

}


#include <bits/stdc++.h>

using namespace std;

int main(){

	string str;

	getline(cin, str);

	sort(str.begin(), str.end());

	cout << str;
	if(str.size()!=0){

		int charNum=0;
		int len = str.size()-1;
		for(int i = 0; i < len; i++){

			if(str[i]==' ' || str[i]==',' || str[i]=='{}'){
				continue;
				}else{

				if(str[i]!=str[i+1])
				charNum++;
					}

			}

		cout << charNum+1 << endl;
		}else{
		cout << 0 << endl;;
			}

	return 0;

}


#include <bits/stdc++.h>

using namespace std;

int main(){

	string str;

	getline(cin, str);

	//int len = str.size();

	str.replace(str.size(),str.size(),"");
	str.replace(0,0,"");

	sort(str.begin(), str.end());
	int start = str.size()-3;

	if(str.size()!=0){

		int charNum=0;
		int len = str.size()-1;
		for(int i = start; i < len; i++){

			if(str[i] != str[i+1])
				charNum++;

			}

		cout << charNum+1 << endl;
		}else{
		cout << 0 << endl;;
			}

	return 0;

}


#include <bits/stdc++.h>

using namespace std;

int main(){

	string str;

	getline(cin, str);

	int lenth=str.size()-1;
	int count =0;
	sort(str.begin(), str.end());

    for(int i=0; i<lenth; i++)
    {
        if(str[i]>=97&&str[i]<=122)
        {
            count++;
            if(str[i]==str[i+1])
                count--;
        }
    }

    cout << count;

	return 0;

}


#include <bits/stdc++.h>

using namespace std;

int main(){

	string str;

	getline(cin, str);

	sort(str.begin(), str.end());

	if(str.size()!=0){

		int charNum=0;
		int len = str.size();
		for(int i = 0; i < len; i++){

			if(str[i]==' ' || str[i]==',' || str[i]=='{}'){
				continue;
				}else{

				if(str[i]!=str[i+1])
				charNum++;
					}
			}

		cout << charNum+1 << endl;
		}else{
		cout << 0 << endl;;
			}

	return 0;

}


#include <iostream>
#include <set>
using namespace std;
int main()
{
    set<int> s;
    for (int i=0;i<s.size();i++)
    {
        int x;
        s.insert(x);
    }
    cout<<s.size();
    return 0;
}


        #include <iostream>
        #include <set>
        using namespace std;
        int main()
        {
            string s;
            cin>>s;
            set<char> c;
            for (int i=0;i<s.size();i++)
            {
                if (s[i]!='{'||s[i]!='}'||s[i]!=' '||s[i]!=';')
                    c.insert(s[i]);
            }
            cout<<c.size();

            return 0;
        }


                #include <iostream>
                #include <string>
                #include <set>
                using namespace std;
                int main()
                {
                    string s;
                    cin>>s;
                    set<char> c;
                    for (int i=0;i<s.size();i++)
                    {
                        if (s[i]!='{'||s[i]!='}'||s[i]!=' '||s[i]!=',')
                            c.insert(s[i]);
                    }
                    cout<<c.size();

                    return 0;
                }


                #include <iostream>
                #include <set>
                using namespace std;
                int main()
                {
                    string s;
                    cin>>s;
                    set<char> c;
                    for (int i=0;i<s.size();i++)
                    {
                        if (s[i]!='{'&&s[i]!='}'&&s[i]!=' '&&s[i]!=',')
                            c.insert(s[i]);
                    }
                    cout<<c.size();

                    return 0;
                }


    #include<bits/stdc++.h>
    using namespace std;
    string s;
    set<char>ss;
    int main()
    {
    	getline(cin,s);
    	for(int i=0;i<s.size();i++)
    		if(s[i]!='{'&&s[i]!='}'&&s[i]!=' '&&s[i]!=',')ss.insert(s[i]);
    	cout<<ss.size()<<endl;
    	return 0;
    }


                    #include <iostream>
                    #include <set>
                    using namespace std;
                    int main()
                    {
                        string s;
                        getline(cin<s);
                        set<char> c;
                        for (int i=0;i<s.size();i++)
                        {
                            if (s[i]!='{'&&s[i]!='}'&&s[i]!=' '&&s[i]!=',')
                                c.insert(s[i]);
                        }
                        cout<<c.size();

                        return 0;
                    }


            #include <iostream>
            #include <set>
            using namespace std;
            int main()
            {
                string s;
                cin>>s;
                set<char> c;
                for (int i=0;i<s.size();i++)
                {
                    if (s[i]!='{'||s[i]!='}'||s[i]!=' '||s[i]!=',')
                        c.insert(s[i]);
                }
                cout<<c.size();

                return 0;
            }


    #include <iostream>
    #include <set>
    using namespace std;
    int main()
    {
        set<int> s;
        for (int i=0;i<s.size();i++)
        {
            int x;cin>>x;
            s.insert(x);
        }
        cout<<s.size();
        return 0;
    }


                #include <iostream>
                #include <set>
                using namespace std;
                int main()
                {
                    string s;
                    cin>>s;
                    set<char> c;
                    for (int i=0;i<s.size();i++)
                    {
                        if (s[i]!='{'||s[i]!='}'||s[i]!=' '||s[i]!=',')
                            c.insert(s.charAT[i]);
                    }
                    cout<<c.size();

                    return 0;
                }


        #include <iostream>
        #include <set>
        using namespace std;
        int main()
        {
            set<int> s;
            for (int i=0;i<1000;i++)
            {
                int x;cin>>x;
                s.insert(x);
            }
            cout<<s.size();
            return 0;
        }


#include <bits/stdc++.h>

using namespace std;

int main(){

    set<char>x;
    string s;
    getline(cin,s);
    for (int i=0;i<s.size();i++)
    {
        if (s[i]>='a'&&s[i]<='z')
            x.insert(s[i]);
    }
    cout<<x.size();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    set <char>(x);
    cin>>s;
    for (int i=0;i<s.size();i++)
    {
        if (s[i]>='a'&&s[i]<='z')
        x.insert(s[i]);
    }
    cout<<x.size();

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){

    string s;
    cin>>s;
    set<char>x;
    for (int i=0;i<s.size();i++)
    {
        if (s[i]>='a'&&s[i]<='z')
            x.insert(s[i]);
    }
    cout<<x.size();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int c=0,f=0;
   set<char>x;
   string s;
   cin>>s;
   for (int i=0;i<s.size();i++)
   {
       if (s[i]=='}'&&s[i]=='{'&&s[i]==',')
        cout<<s[i];

   }
   for (int i=0;i<s.size();i++)
   {
       x.insert(s[i]);
   }
   cout<<x.size();

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    set <char>(x);
    cin>>s;
    for (int i=1;i<=s.size();i++)
    {
        if (s[i]!='}'&&s[i]!='{'&&s[i]!=',')
        x.insert(s[i]);
    }
    cout<<x.size()-1;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(){

    set<char>x;
    string s;
    cin>>s;
    for (int i=0;i<s.size();i++)
    {
        if (s[i]>='a'&&s[i]<='z')
            x.insert(s[i]);
    }
    cout<<x.size();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    string s;
    set <char>(x);
    cin>>s;
    for (int i=1;i<=s.size();i++)
    {
        if (s[i]>='a'&&s[i]<='z')
        x.insert(s[i]);
    }
    cout<<x.size();

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int c=0,f=0;
   set<char>x;
   string s;
   getline(cin,s);
   for (int i=0;i<s.size();i++)
   {
       if (s[i]=='}'&&s[i]=='{'&&s[i]==',')
        cout<<s[i];

   }
   for (int i=0;i<s.size();i++)
   {
       x.insert(s[i]);
   }
   cout<<x.size()/2;

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{

   string s;
   cin>>s;
   set<char>x;
   for (int i=0;i<s.size();i++){
        if (s[i]>='a'&&s[i]<='z')

            x.insert(s[i]);
   }
   cout<<x.size();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main()
{
    int c=0,f=0;
   set<char>x;
   string s;
   cin>>s;
   for (int i=0;i<s.size();i++)
   {
       if (s[i]=='}'&&s[i]=='{'&&s[i]==',')
        cout<<s[i];

   }
   for (int i=0;i<s.size();i++)
   {
       x.insert(s[i]);
   }
   cout<<x.size()/2;

    return 0;
}


#include <iostream>
using namespace std;

int main() {
  int k,r;
    while(cin>>k>>r)
    {
        for(int i=1;i<=10;i++)
        {
            if((i*k)%10==r||(i*k)%10==0)
            {
                cout<<i<<endl;
                break;
            }
        }
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <map>

using namespace std;

int main(){

    string entrada;
    map <char, int> contagem;
    int total = 0;
    char letra;

    getline(cin, entrada);

    for(auto get : entrada)
    {
        if(get != '{' && get != '}' && get != ',' && get != ' ')
        {
            contagem[get]++;
        }
    }

    cout << contagem.size() << endl;

    return 0;
}


#include <bits/stdc++.h>
int v[24];

using namespace std;

int main(){
    int i,aux,cont=0;
    string X;

    getline(cin,X);

    for(i=0;i<=X.size();i++){
        aux=X[i]-97;
        if(aux<=25 && aux>=0){
            v[aux]++;
        }
        if(v[aux]==1){
            cont++;
        }
    }

    cout<<cont<<endl;

return 0;}


#include <bits/stdc++.h>

using namespace std;

int main(){
    set<char> letters;
    char letra;
    scanf("%*c");
    while(scanf("%c%*c%*c",&letra)!=EOF){
        if(letra!='}')
            letters.insert(letra);
    }
    cout<<letters.size()<<endl;

    return 0;
}


#include <iostream>
#include <algorithm>
#include <map>

using namespace std;

int main(){

    string entrada;
    map <char, int> contagem;
    int total = 0;
    char letra;

    getline(cin, entrada);

    for(auto get : entrada){

        if(get != '{' && get != '}' && get != ',' && get != ' '){

            contagem[get] = count(entrada.begin(), entrada.end(), get);
        }
    }

    for(auto soma : contagem){

        total += soma.second;
    }

    cout << total << endl;
}


#include<bits/stdc++.h>

using namespace std;

int main(){
        string in;
        vector <char> letters;
        getline(cin, in);
        bool serio = true;
        for(int i = 1; i < in.size() - 1; i++){
                for(int j = 0; j< letters.size(); j++){
                        if(in[i]== letters[j] or in[i] == ' ' or in[i] == ','){
                                serio = false;
                        }
                }
                if(serio){
                        letters.push_back(in[i]);
                }
                serio = true;
        }
        cout << letters.size()<< endl;
        return 0;
}


# include <bits/stdc++.h>
using namespace std;
int main()
{
    set<char>  a;
    char b;
    while(cin>>b)
    a.insert(b);
    if(a.size()>3){
    cout << a.size()-3;
    }
    else{
        cout <<"0";
    }
}


# include <bits/stdc++.h>
using namespace std;
int main()
{
    set<char>  a;
    cin >>a;
    cout << a.size();
}


# include <bits/stdc++.h>
using namespace std;
int main()
{
    set<char>  a;
    char b;
    while(cin>>b)
    a.insert(b);
    cout << a.size();
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
set<char> s;
char c;
while(cin >>c)
{
	if(c>='a'&&c<='z')
	s.insert(c);
}
cout<<s.size();
}


# include <iostream>
using namespace std;
int main()
{
    set<char>  a;
    cin >>a;
    cout << a.size();
}


# include <bits/stdc++.h>
using namespace std;
int main()
{
    set<char>  a;
    char b;
    while(b!='}')
    cin >>b;
    a.insert(b);
    if(a.size()>2){
    cout << a.size()-2;
    }
    else{
        cout <<"0";
    }
}


# include <bits/stdc++.h>
using namespace std;
int main()
{
    set<char>  a;
    char b;
    while(cin>>b)
    a.insert(b);
    cout << a.size()-3;
}


#include <iostream>
#include<bits/stdc++.h>
#include<vector>
#include<algorithm>
#include<math.h>
#include<map>
using namespace std ;
typedef long long ll ;
int main(){
    unordered_map<ll , ll > m ;
    string s ;
    char c ;
    cin >> c ;
    while (c != '}')
    {
        s+=c ;
        cin >> c ;
    }

    //s.pop_back() ;
    if (s.size() < 2)
    {
        cout << 0 <<endl ;
        return  0 ;
    }

    for (ll i = 1; i < s.size(); i += 3 )
    {
        m[s[i] - 'a']++ ;
    }
    cout << m.size() << endl ;
    return 0 ;
}


#include <iostream>
#include<bits/stdc++.h>
#include<vector>
#include<algorithm>
#include<math.h>
#include<map>
using namespace std ;
typedef long long ll ;
int main(){
    unordered_map<char , ll > m ;
    string s ;
    char c ;
    cin >> c ;
    while (c != '}')
    {
        //cout << c<<"##" <<endl ;
        m[c]++ ;
        cin >> c ;
    }

    //s.pop_back() ;
    if (m.size() < 2)
    {
        cout << m.size() - 1 <<endl ;
        return  0 ;
    }

    cout << m.size() - 2 << endl ;
    return 0 ;
}


#include <iostream>
#include<bits/stdc++.h>
#include<vector>
#include<algorithm>
#include<math.h>
#include<map>
using namespace std ;
typedef long long ll ;
int main(){
    unordered_map<ll , ll > m ;
    string s ;
    char c ;
    cin >> c ;
    while (c != '}')
    {
        s+=c ;
        cin >> c ;
    }

    s.pop_back() ;
    if (s.size() < 2)
    {
        cout << 0 <<endl ;
        return  0 ;
    }

    for (ll i = 1; i < s.size(); i += 3 )
    {
        m[s[i] - '0']++ ;
    }
    cout << m.size() << endl ;
    return 0 ;
}


#include <iostream>
#include<bits/stdc++.h>
#include<vector>
#include<algorithm>
#include<math.h>
#include<map>
using namespace std ;
typedef long long ll ;
int main(){
    unordered_map<char , ll > m ;
    string s ;
    char c ;
    cin >> c ;
    while (c != '}')
    {
        //cout << c<<"##" <<endl ;
        m[c]++ ;
        cin >> c ;
    }

    //s.pop_back() ;
    if (m.size() < 2)
    {
        cout << 0 <<endl ;
        return  0 ;
    }

   if (m[','] == 0 )
   {
       cout << m.size() - 1 << endl ;
       return  0 ;
   }

    cout << m.size() - 2 << endl ;
    return 0 ;
}


#include <iostream>
#include<bits/stdc++.h>
#include<vector>
#include<algorithm>
#include<math.h>
#include<map>
using namespace std ;
typedef long long ll ;
int main(){
    unordered_map<char , ll > m ;
    string s ;
    char c ;
    cin >> c ;
    while (c != '}')
    {
        //cout << c<<"##" <<endl ;
        m[c]++ ;
        cin >> c ;
    }

    //s.pop_back() ;
    if (m.size() <= 2)
    {
        cout << m.size() - 1 <<endl ;
        return  0 ;
    }

    cout << m.size() - 2 << endl ;
    return 0 ;
}


#include <iostream>
#include<bits/stdc++.h>
#include<vector>
#include<algorithm>
#include<math.h>
#include<map>
using namespace std ;
typedef long long ll ;
int main(){
    unordered_map<char , ll > m ;
    string s ;
    char c ;
    cin >> c ;
    while (c != '}')
    {
        //cout << c<<"##" <<endl ;
        m[c]++ ;
        cin >> c ;
    }

    //s.pop_back() ;
    /*if (m.size() <= 2)
    {
        cout << 0 <<endl ;
        return  0 ;
    }*/

   if (m[','] == 0 )
   {
       cout << m.size() - 1 << endl ;
   }

    cout << m.size() - 2 << endl ;
    return 0 ;
}


#include <iostream>
#include<bits/stdc++.h>
#include<vector>
#include<algorithm>
#include<math.h>
#include<map>
using namespace std ;
typedef long long ll ;
int main(){
    unordered_map<char , ll > m ;
    string s ;
    char c ;
    cin >> c ;
    while (c != '}')
    {
        //cout << c<<"##" <<endl ;
        m[c]++ ;
        cin >> c ;
    }

    //s.pop_back() ;
    if (m.size() <= 2)
    {
        cout << 0 <<endl ;
        return  0 ;
    }

    cout << m.size() - 2 << endl ;
    return 0 ;
}


#include <iostream>
#include <ctype.h>
#include <set>
using namespace std;

int main()
{
   string s;
   set<char> l;
   getline(cin, s);

   int i = 0;
   while(s[i])
   {
        if(isalpha(s[i]))
            l.insert(s[i]);
        i++;
   }

   cout << l.size() << endl;
}


#include<bits/stdc++.h>
using namespace std;
#define _CRT_SECURE_NO_DEPRECATE
#define ll               long long
#define nl               '\n'                             // NL - sign of new line

#define upc(str, c)      str[c] = toupper(str[c]);         // make single char uppercase
#define lowerc(str, c)   str[c] = tolower(str[c]);         // make single char lowercase

#define ups(str)       	 transform(str.begin(), str.end(), str.begin(), ::toupper); // make entire string uppercase
#define lowers(str)      transform(str.begin(), str.end(), str.begin(), ::tolower); // make entire string lowercase

#define ps(x,y)          fixed << setprecision(y) << x     // usage: t=1.1234; cout << ps(t,4); // it means it will print 4 decimal places.

#define vi               vector <int>                      //create vector of int numbers
#define vs               vector <string>                      //create vector of int numbers
#define eb               emplace_back
#define sort(v)          sort(v.begin(), v.end());
#define rev(v)		     reverse(v.begin(), v.end())       // reverse the vector

#define si               set<int>

#define mii			     std::map <int,int>
#define multimii		 std::multimap <int,int>
#define mss			     map <string, string>

#define w(t)             unsigned int t; cin >> t; while(t--)      //  usage: create quickly number of test
mt19937                  rng(chrono::steady_clock::now().time_since_epoch().count());

void c_p_c()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
void solve();
//==================================6

//==================================
int32_t main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	c_p_c();
	//--------------------------------

	int t = 1;
	while (t--)
	{
		solve();
		cout << nl;
	}

	setprecision(20);
	cerr << "time taken : " << (double)clock() / CLOCKS_PER_SEC << " secs" << nl;
	return 0;
}

void solve()
{

	string s;
	set<char> l;
	getline(cin, s);

	int i = 0;
	while (s[i])
	{
		if (isalpha(s[i]))
			l.insert(s[i]);
		i++;
	}

	cout << l.size() << endl;
}


#include <iostream>
#include <ctype.h>
#include <set>
using namespace std;

int main()
{

 string s;
	set<char> l;
	getline(cin, s);

	for (int i{}; i < s.size(); ++i)
	{
		if (isalpha(s[i]))
			l.insert(s[i]);
	}

	cout << l.size() << endl;

 return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define _CRT_SECURE_NO_DEPRECATE
#define ll               long long
#define nl               '\n'                             // NL - sign of new line

#define upc(str, c)      str[c] = toupper(str[c]);         // make single char uppercase
#define lowerc(str, c)   str[c] = tolower(str[c]);         // make single char lowercase

#define ups(str)       	 transform(str.begin(), str.end(), str.begin(), ::toupper); // make entire string uppercase
#define lowers(str)      transform(str.begin(), str.end(), str.begin(), ::tolower); // make entire string lowercase

#define ps(x,y)          fixed << setprecision(y) << x     // usage: t=1.1234; cout << ps(t,4); // it means it will print 4 decimal places.

#define vi               vector <int>                      //create vector of int numbers
#define vs               vector <string>                      //create vector of int numbers
#define eb               emplace_back
#define sort(v)          sort(v.begin(), v.end());
#define rev(v)		     reverse(v.begin(), v.end())       // reverse the vector

#define si               set<int>

#define mii			     std::map <int,int>
#define multimii		 std::multimap <int,int>
#define mss			     map <string, string>

#define w(t)             unsigned int t; cin >> t; while(t--)      //  usage: create quickly number of test
mt19937                  rng(chrono::steady_clock::now().time_since_epoch().count());

void c_p_c()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
void solve();
//==================================6

//==================================
int32_t main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	c_p_c();
	//--------------------------------

	int t = 1;
	while (t--)
	{
		solve();
		cout << nl;
	}

	setprecision(20);
	cerr << "time taken : " << (double)clock() / CLOCKS_PER_SEC << " secs" << nl;
	return 0;
}

void solve()
{

	set<char> s;

	char c;
	while (cin >> c)
	{
		if (c != '{' && c != '}' && c != ',')
		{
			s.insert(c);
		}
	}

	cout << s.size();
}


#include<bits/stdc++.h>
using namespace std;
#define _CRT_SECURE_NO_DEPRECATE
#define ll               long long
#define nl               '\n'                             // NL - sign of new line

#define upc(str, c)      str[c] = toupper(str[c]);         // make single char uppercase
#define lowerc(str, c)   str[c] = tolower(str[c]);         // make single char lowercase

#define ups(str)       	 transform(str.begin(), str.end(), str.begin(), ::toupper); // make entire string uppercase
#define lowers(str)      transform(str.begin(), str.end(), str.begin(), ::tolower); // make entire string lowercase

#define ps(x,y)          fixed << setprecision(y) << x     // usage: t=1.1234; cout << ps(t,4); // it means it will print 4 decimal places.

#define vi               vector <int>                      //create vector of int numbers
#define vs               vector <string>                      //create vector of int numbers
#define eb               emplace_back
#define sort(v)          sort(v.begin(), v.end());
#define rev(v)		     reverse(v.begin(), v.end())       // reverse the vector

#define si               set<int>

#define mii			     std::map <int,int>
#define multimii		 std::multimap <int,int>
#define mss			     map <string, string>

#define w(t)             unsigned int t; cin >> t; while(t--)      //  usage: create quickly number of test
mt19937                  rng(chrono::steady_clock::now().time_since_epoch().count());

void c_p_c()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
void solve();
//==================================6

//==================================
int32_t main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	c_p_c();
	//--------------------------------
	solve();

	cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << nl;
	return 0;
}

void solve()
{

	string s;
	set<char> l;
	getline(cin, s);

	int i = 0;
	while (s[i])
	{
		if (isalpha(s[i]))
			l.insert(s[i]);
		i++;
	}

	cout << l.size() << endl;
}


#include<bits/stdc++.h>
using namespace std;
#define _CRT_SECURE_NO_DEPRECATE
#define ll               long long
#define nl               '\n'                             // NL - sign of new line

#define upc(str, c)      str[c] = toupper(str[c]);         // make single char uppercase
#define lowerc(str, c)   str[c] = tolower(str[c]);         // make single char lowercase

#define ups(str)       	 transform(str.begin(), str.end(), str.begin(), ::toupper); // make entire string uppercase
#define lowers(str)      transform(str.begin(), str.end(), str.begin(), ::tolower); // make entire string lowercase

#define ps(x,y)          fixed << setprecision(y) << x     // usage: t=1.1234; cout << ps(t,4); // it means it will print 4 decimal places.

#define vi               vector <int>                      //create vector of int numbers
#define vs               vector <string>                      //create vector of int numbers
#define eb               emplace_back
#define sort(v)          sort(v.begin(), v.end());
#define rev(v)		     reverse(v.begin(), v.end())       // reverse the vector

#define si               set<int>

#define mii			     std::map <int,int>
#define multimii		 std::multimap <int,int>
#define mss			     map <string, string>

#define w(t)             unsigned int t; cin >> t; while(t--)      //  usage: create quickly number of test
mt19937                  rng(chrono::steady_clock::now().time_since_epoch().count());

void c_p_c()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}
void solve();
//==================================6

//==================================
int32_t main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	c_p_c();
	//--------------------------------
	solve();

	cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << nl;
	return 0;
}

void solve()
{

	set<char> s;

	char c;
	while (cin >> c)
	{
		if (c != '{' && c != '}' && c != ',')
		{
			s.insert(c);
		}
	}

	cout << s.size();
}


#include<bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main()
{
    int k=0;
    string s;
    cin>>s;
    int l=s.size();
    if(l<3)
    k=0;
    if(l==3)
    k=1;
    if(l>3)
    {
        int n = (l-3)*2/3;
    string a[n];
   rep(i,1,l)
   {
       int j=(i-1)/3;
       a[j]=s.at(i);
       i+=2;
   }
   k++;
   rep(i,1,n)
   {
       int c=0,d=0;
       rep(j,0,i)
       {
           d++;
           if(a[j]!=a[i])
           c++;
       }
       if(c==d)
       k++;
   }
   cout<<k;
}


#include<bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main()
{
    int k=0;
    string s;
    cin>>s;
    int l=s.size();
    if(l<3)
    k=0;
    if(l==3)
    k=1;
    if(l>3)
    {
        int n = (l-3)*2/3;
    string a[n];
   rep(i,1,l)
   {
       int j=(i-1)/3;
       a[j]=s.at(i);
   }
   k++;
   rep(i,1,n)
   {
       int c=0,d=0;
       rep(j,0,i)
       {
           d++;
           if(a[j]!=a[i])
           c++;
       }
       if(c==d)
       k++;
   }
   cout<<k;
}


#include<bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main()
{
    int k=0;
    string s;
    cin>>s;
    int l=s.size();
    if(l<3)
    k=0;
    if(l==3)
    k=1;
    if(l>3)
    {
        int n = l/3;
    string a[n];
   rep(i,1,l)
   {
       int j=(i-1)/3;
       a[j]=s.at(i);
       i+=2;
   }
   k++;
   rep(i,1,n)
   {
       int c=0,d=0;
       rep(j,0,i)
       {
           d++;
           if(a[j]!=a[i])
           c++;
       }
       if(c==d)
       k++;
   }
    }
   cout<<k;
}


#include<bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main()
{
    int k=0;
    string s;
    cin>>s;
    int l=s.size();
    if(l<3)
    k=0;
    if(l==3)
    k=1;
    if(l>3)
    {
        int n = (l-3)*2/3;
    string a[n];
   rep(i,1,l)
   {
       int j=(i-1)/3;
       a[j]=s.at(i);
       i+=2;
   }
   k++;
   rep(i,1,n)
   {
       int c=0,d=0;
       rep(j,0,i)
       {
           d++;
           if(a[j]!=a[i])
           c++;
       }
       if(c==d)
       k++;
   }
   cout<<k;
}
}


#include<bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main()
{
    int k=0;
    string s;
    getline(cin,s);
    cout<<l<<endl;
    if(l<3)
    k=0;
    if(l==3)
    k=1;
    if(l>3)
    {
        int n = l/3;
    string a[n];
   rep(i,1,l)
   {
       int j=(i-1)/3;
       a[j]=s.at(i);
       i+=2;
   }
   k++;
   rep(i,1,n)
   {
       int c=0,d=0;
       rep(j,0,i)
       {
           d++;
           if(a[j]!=a[i])
           c++;
       }
       if(c==d)
       k++;
   }
    }
   cout<<k;
}


#include<bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main()
{
    int k=0;
    string s;
    getline(cin,s);
    int l=s.size();
    if(l<3)
    k=0;
    if(l==3)
    k=1;
    if(l>3)
    {
        int n = l/3;
    string a[n];
   rep(i,1,l)
   {
       int j=(i-1)/3;
       a[j]=s.at(i);
       i+=2;
   }
   k++;
   rep(i,1,n)
   {
       int c=0,d=0;
       rep(j,0,i)
       {
           d++;
           if(a[j]!=a[i])
           c++;
       }
       if(c==d)
       k++;
   }
    }
   cout<<k;
}


#include<bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main()
{
    int k=0;
    string s;
    cin>>s;
    int l=s.size();
    if(l<3)
    k=0;
    if(l==3)
    k=1;
    if(l>3)
    {
        int n = (l-3)*2/3;
    string a[n];
   rep(i,1,l)
   {
       int j=(i-1)/3;
       a[j]=s.at(i);
       i+=2;
   }
   k++;
   rep(i,1,n)
   {
       int c=0,d=0;
       rep(j,0,i)
       {
           d++;
           if(a[j]!=a[i])
           c++;
       }
       if(c==d)
       k++;
   }
    }
   cout<<k;
}