#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll zz = 0;
    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
        if (a[i].fst == 0 && a[i].snd == 0) {
            zz++;
        }
        //printf("%lld %lld / ", a[i].fst, a[i].snd);
    }

    //puts("");

    a[n+1].fst = 2e9;
    a[n+1].snd = 2e9;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i+1;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        //printf("%d %d / ", i , j);
        if (a[i].snd == 0) {
            continue;
        }
        ans = max(ans, (ll)j-i);
        i = j-1;
    }

    ans = max(cnt, ans+zz);

    cnt=0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst+a[i].snd == 0 && a[i].fst != 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt+zz);
    cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].snd-a[i].fst == 0 && a[i].fst != 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt+zz);

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll zz = 0;
    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
        if (a[i].fst == 0 && a[i].snd == 0) {
            zz++;
        }
        //printf("%lld %lld / ", a[i].fst, a[i].snd);
    }

    //puts("");

    a[n+1].fst = 2e9;
    a[n+1].snd = 2e9;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i+1;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        //printf("%d %d / ", i , j);
        if (a[i].snd == 0 || a[i].fst == 0) {
            continue;
        }
        ans = max(ans, (ll)j-i);
        i = j;
    }

    ans = max(cnt, ans+zz);

    cnt=0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst+a[i].snd == 0 && a[i].fst != 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt+zz);
    cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].snd-a[i].fst == 0 && a[i].fst != 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt+zz);

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;
    int j = 1;
    for (int i = 1; i <= n; i++) {
        while (j < i && (a[i].fst != a[j].fst || a[i].snd != a[j].snd)) {
            j++;
        }
        if ((a[i].fst == a[j].fst && a[i].snd == a[j].snd)) {
            if (a[i].fst == 0 && a[j].fst == 0 && i == j) {
                continue;
            }
            ans = max(ans, (ll)i-j+1);
        }
    }

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
    }
    ans = cnt;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i+1;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        if (i+1 == j && a[i].snd == 0 && a[j].snd == 0) {
            continue;
        }
        ans = max(ans, (ll)j-i);
        i = j;
    }

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
        //printf("%lld %lld / ", a[i].fst, a[i].snd);
    }
    ans = cnt;

    //puts("");

    a[n+1].fst = 2e9;
    a[n+1].snd = 2e9;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i+1;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        //printf("%d %d / ", i , j);
        if (a[i].snd == 0) {
            continue;
        }
        ans = max(ans, (ll)j-i);
        i = j;
    }

    cnt=0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst+a[i].snd == 0 && a[i].fst != 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt);
    cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].snd-a[i].fst == 0 && a[i].fst != 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt);

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
    }
    ans = cnt;

    a[n+1].fst = 2e9;
    a[n+1].snd = 2e9;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        if (a[i].snd == 0) {
            continue;
        }
        ans = max(ans, (ll)j-i);
        i = j-1;
    }

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
    }
    ans = cnt;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        ans = max(ans, (ll)j-i);
        i = j;
    }

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll zz = 0;
    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
        if (a[i].fst == 0 && a[i].snd == 0) {
            zz++;
        }
        //printf("%lld %lld / ", a[i].fst, a[i].snd);
    }

    //puts("");

    a[n+1].fst = 2e9;
    a[n+1].snd = 2e9;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i+1;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        //printf("%d %d / ", i , j);
        if (a[i].snd == 0) {
            continue;
        }
        ans = max(ans, (ll)j-i);
        i = j;
    }

    ans = max(cnt, ans+zz);

    cnt=0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst+a[i].snd == 0 && a[i].fst != 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt+zz);
    cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].snd-a[i].fst == 0 && a[i].fst != 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt+zz);

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
    }
    ans = cnt;

    a[n+1].fst = 2e9;
    a[n+1].snd = 2e9;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i+1;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        if (a[i].snd == 0) {
            continue;
        }
        ans = max(ans, (ll)j-i);
        i = j;
    }

    cnt=0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst+a[i].snd == 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt);
    cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].snd-a[i].fst == 0) {
            cnt++;
        }
    }
    ans = max(ans, (ll)cnt);

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
    }
    ans = cnt;

    a[n+1].fst = 2e9;
    a[n+1].snd = 2e9;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i+1;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        if (a[i].snd == 0 && a[j].snd == 0) {
            continue;
        }
        ans = max(ans, (ll)j-i);
        i = j;
    }

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
    }
    ans = cnt;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        while (j < i && (a[i].fst != a[j].fst || a[i].snd != a[j].snd)) {
            j++;
        }
        if ((a[i].fst == a[j].fst && a[i].snd == a[j].snd)) {
            ans = max(ans, (ll)i-j+1);
        }
    }

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
    }
    ans = cnt;

    a[n+1].fst = 2e9;
    a[n+1].snd = 2e9;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        j = i+1;
        while (j <= n && a[i].fst == a[j].fst && a[i].snd == a[j].snd) {
            j++;
        }
        if (a[i].snd == 0) {
            continue;
        }
        ans = max(ans, (ll)j-i);
        i = j;
    }

    printf("%lld", ans);

    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<list>
#include<map>
#include<set>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<tuple>
#include<functional>
#include<utility>
#include<cmath>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cassert>
#define y1 fuck
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using dbl = double;
using ldb = long double;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using mii = map<int,int>;
using msi = map<string,int>;
using umii = unordered_map<int,int>;
using umsi = unordered_map<string,int>;
using iii = tuple<int,int,int>;
using lll = tuple<ll,ll,ll>;
ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {if(!a||!b)return a+b;return a*(b/gcd(a,b));}
const int dx[]={0,1,0,-1},dy[]={1,0,-1,0};

int n;
pll a[222222];

int main() {
    //cin.tie(0); ios_base::sync_with_stdio(0);

    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].snd);
    }
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i].fst);
        if (a[i].fst == 0 || a[i].snd == 0) {
            continue;
        }
        int gc = gcd(a[i].fst, a[i].snd);
        a[i].fst /= gc;
        a[i].snd /= gc;
    }

    sort(a+1,a+1+n);

    ll ans = 0;

    ll cnt = 0;
    for (int i = 1; i <= n; i++) {
        if (a[i].fst == 0) {
            cnt++;
        }
    }
    ans = cnt;

    int j = 1;
    for (int i = 1; i <= n; i++) {
        while (j < i && (a[i].fst != a[j].fst || a[i].snd != a[j].snd)) {
            j++;
        }
        if ((a[i].fst == a[j].fst && a[i].snd == a[j].snd)) {
            if (a[i].snd == 0 && a[j].snd == 0 && i == j) {
                continue;
            }
            ans = max(ans, (ll)i-j+1);
        }
    }

    printf("%lld", ans);

    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, t = 1, zero = 0, z1 = 0, z2 = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        if (a[i] == 0 && b[i] != 0){
            zero++;
            continue;
        }
        else if (b[i] == 0 && a[i] != 0){
            z1++;
            continue;
        }
        else if (b[i] == 0 && a[i] == 0){
            z2++;
        }
        long long ai = a[i], bi = b[i];
        if (bi < 0){
            ai*=-1;
            bi*=-1;
        }
        V.push_back(make_pair(ai, bi));
    }

    sort(V.begin(),V.end(), comp);

    for (int i = 1; i < V.size(); i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    //ma = max(ma, z1);

    if (zero == n){
        cout <<0;
        return 0;
    }

    if (z2 == n){
        ma = 0;
    }

    cout <<ma;

    /*for (int i = 0; i < V.size(); i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, ai, bi, t = 1, zero = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        V.push_back(make_pair(a[i], b[i]));
    }

    sort(V.begin(),V.end(), comp);

    if (V[0].first == 0 && V[0].second != 0){
        zero++;
    }

    for (int i = 1; i < n; i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first && (V[i].first != 0) || V[i].first == V[i].second){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    if (zero == n){
        cout <<0;
        return 0;
    }

    cout <<ma;

    /*for (int i = 0; i < n; i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second <= as.second * bs.first;
}

int main()
{
    long long n, ma = 1, ai, bi, t = 1, zero = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        V.push_back(make_pair(a[i], b[i]));
    }

    sort(V.begin(),V.end(), comp);

    if (V[0].first == 0 && V[0].second != 0){
        zero++;
    }

    for (int i = 1; i < n; i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    if (zero == n){
        cout <<0;
        return 0;
    }

    cout <<ma;

    /*for (int i = 0; i < n; i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, ai, bi, t = 1, zero = 0, z1 = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        if (a[i] == 0 && b[i] != 0){
            zero++;
            continue;
        }
        else if (b[i] == 0){
            z1++;
        }
        V.push_back(make_pair(a[i], b[i]));
    }

    sort(V.begin(),V.end(), comp);

    for (int i = 1; i < V.size(); i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    ma = max(ma, z1);

    if (zero == n){
        cout <<0;
        return 0;
    }

    cout <<ma;

    /*for (int i = 0; i < n; i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, t = 1, zero = 0, z1 = 0, z2 = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        if (a[i] == 0 && b[i] != 0){
            zero++;
            continue;
        }
        else if (b[i] == 0 && a[i] != 0){
            z1++;
            continue;
        }
        else if (b[i] == 0 && a[i] == 0){
            z2++;
        }
        long long ai = a[i], bi = b[i];
        if (bi < 0){
            ai*=-1;
            bi*=-1;
        }
        V.push_back(make_pair(ai, bi));
    }

    sort(V.begin(),V.end(), comp);

    for (int i = 1; i < V.size(); i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    //ma = max(ma, z1);

    if (zero == n){
        cout <<0;
        return 0;
    }

    if (z1 == n){
        ma = 0;
    }

    cout <<ma+z2;

    /*for (int i = 0; i < V.size(); i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
    int n;
    vector<double> vesh;
    vector<int> a, b;
    cin >>n;
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        a.push_back(c);
    }
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        b.push_back(c);
    }
    for (int i = 0; i < n; i++){
        if (a[i] == 0){
            vesh.push_back(618618618);
            continue;
        }
        vesh.push_back(b[i] * 1.0 / a[i]);
    }

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

    int m = 1, ma = 1;
    double w = vesh[0];
    double pop = w;
    for (int i = 1; i < n; i++){
        if (vesh[i] == w){
            m++;
            if (ma < m){
                ma = m;
                pop = w;
            }
        }
        else{
            w = vesh[i];
            m = 1;
        }
    }

    int sum = 0;

    for (int i = 0; i < n; i++){
        //cout <<a[i]*(-pop) + b[i] <<" ";
        if (abs(a[i]*(-pop) + b[i]) <= 0.001){
            sum++;
        }
    }
    cout <<sum;
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, t = 1, zero = 0, z1 = 0, z2 = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        if (a[i] == 0 && b[i] != 0){
            zero++;
            continue;
        }
        else if (b[i] == 0 && a[i] != 0){
            z1++;
            continue;
        }
        else if (b[i] == 0 && a[i] == 0){
            z2++;
            continue;
        }
        long long ai = a[i], bi = b[i];
        if (bi < 0){
            ai*=-1;
            bi*=-1;
        }
        V.push_back(make_pair(ai, bi));
    }

    sort(V.begin(),V.end(), comp);

    for (int i = 1; i < V.size(); i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            //cout <<V[i-1].first <<" " <<V[i-1].second<<endl;
            //cout <<V[i].first <<" " <<V[i].second<<endl;
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    //ma = max(ma, z1);

    if (zero == n){
        cout <<0;
        return 0;
    }

    if (z2 == n){
        ma = 0;
    }

    cout <<ma+z2;

    /*for (int i = 0; i < V.size(); i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    int n;
    vector<double> vesh;
    vector<int> a, b;
    cin >>n;
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        a.push_back(c);
    }
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        b.push_back(c);
    }
    for (int i = 0; i < n; i++){
        if (a[i] == 0){
            vesh.push_back(618618618);
            continue;
        }
        vesh.push_back(b[i] * 1.0 / a[i]);
    }

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

    int m = 1, ma = 1;
    double w = vesh[0];
    double pop = w;
    for (int i = 1; i < n; i++){
        if (vesh[i] == w){
            m++;
            if (ma < m){
                ma = m;
                pop = w;
            }
        }
        else{
            w = vesh[i];
            m = 1;
        }
    }

    if (pop == 618618618){
        cout <<0;
        return 0;
    }
    cout << pop;
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, t = 1, zero = 0, z1 = 0, z2 = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        if (a[i] == 0 && b[i] != 0){
            zero++;
            continue;
        }
        else if (b[i] == 0 && a[i] != 0){
            z1++;
            continue;
        }
        else if (b[i] == 0 && a[i] == 0){
            z2++;
            continue;
        }
        long long ai = a[i], bi = b[i];
        if (bi < 0){
            ai*=-1;
            bi*=-1;
        }
        V.push_back(make_pair(ai, bi));
    }

    sort(V.begin(),V.end(), comp);

    for (int i = 1; i < V.size(); i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            //cout <<V[i-1].first <<" " <<V[i-1].second<<endl;
            //cout <<V[i].first <<" " <<V[i].second<<endl;
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    //ma = max(ma, z1);

    if (zero == n){
        cout <<0;
        return 0;
    }

    if (z2 == n){
        ma = 0;
    }

    cout <<max(ma, z1)+z2;

    /*for (int i = 0; i < V.size(); i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, ai, bi, t = 1, zero = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        V.push_back(make_pair(a[i], b[i]));
    }

    sort(V.begin(),V.end(), comp);

    if (V[0].first == 0){
        zero++;
    }

    for (int i = 1; i < n; i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0){
            zero++;
        }
    }

    if (zero == n){
        cout <<0;
        return 0;
    }

    cout <<ma;

    /*for (int i = 0; i < n; i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, t = 1, zero = 0, z1 = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        if (a[i] == 0 && b[i] != 0){
            zero++;
            continue;
        }
        else if (b[i] == 0){
            z1++;
        }
        long long ai = a[i], bi = b[i];
        if (bi < 0){
            ai*=-1;
            bi*=-1;
        }
        V.push_back(make_pair(ai, bi));
    }

    sort(V.begin(),V.end(), comp);

    for (int i = 1; i < V.size(); i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    ma = max(ma, z1);

    if (zero == n){
        cout <<0;
        return 0;
    }

    cout <<ma;

    /*for (int i = 0; i < n; i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
    int n;
    vector<double> vesh;
    vector<int> a, b;
    cin >>n;
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        a.push_back(c);
    }
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        b.push_back(c);
    }
    for (int i = 0; i < n; i++){
        if (a[i] == 0){
            vesh.push_back(618618618);
            continue;
        }
        vesh.push_back(b[i] * 1.0 / a[i]);
    }

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

    int m = 1, ma = 1;
    double w = vesh[0];
    double pop = w;
    for (int i = 1; i < n; i++){
        if (vesh[i] == w){
            m++;
            if (ma < m){
                ma = m;
                pop = w;
            }
        }
        else{
            w = vesh[i];
            m = 1;
        }
    }

    int sum = 0;

    for (int i = 0; i < n; i++){
        //cout <<a[i]*(-pop) + b[i] <<" ";
        if (abs(a[i]*(-pop) + b[i]) == 0){
            sum++;
        }
    }
    cout <<sum;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
    int n;
    vector<double> vesh;
    vector<int> a, b;
    cin >>n;
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        a.push_back(c);
    }
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        b.push_back(c);
    }
    for (int i = 0; i < n; i++){
        if (a[i] == 0){
            vesh.push_back(618618618);
            continue;
        }
        vesh.push_back(b[i] * 1.0 / a[i]);
    }

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

    int m = 1, ma = 1;
    double w = vesh[0];
    double pop = w;
    for (int i = 1; i < n; i++){
        if (vesh[i] == w){
            m++;
            if (ma < m){
                ma = m;
                pop = w;
            }
        }
        else{
            w = vesh[i];
            m = 1;
        }
    }

    int sum = 0;

    for (int i = 0; i < n; i++){
        //cout <<a[i]*(-pop) + b[i] <<" ";
        if (abs(a[i]*(-pop) + b[i]) <= 0.00001){
            sum++;
        }
    }
    cout <<sum;
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, ai, bi, t = 1, zero = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        V.push_back(make_pair(a[i], b[i]));
    }

    sort(V.begin(),V.end(), comp);

    if (V[0].first == 0 && V[0].second != 0){
        zero++;
    }

    for (int i = 1; i < n; i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    if (zero == n){
        cout <<0;
        return 0;
    }

    cout <<ma;

    /*for (int i = 0; i < n; i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, t = 1, zero = 0, z1 = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        if (a[i] == 0 && b[i] != 0){
            zero++;
            continue;
        }
        else if (b[i] == 0){
            z1++;
            continue;
        }
        long long ai = a[i], bi = b[i];
        if (bi < 0){
            ai*=-1;
            bi*=-1;
        }
        V.push_back(make_pair(ai, bi));
    }

    sort(V.begin(),V.end(), comp);

    for (int i = 1; i < V.size(); i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    //ma = max(ma, z1);

    if (zero == n){
        cout <<0;
        return 0;
    }

    if (z1 == n){
        ma = 0;
    }

    cout <<ma+z1;

    /*for (int i = 0; i < V.size(); i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
    int n;
    vector<float> vesh;
    vector<int> a, b;
    cin >>n;
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        a.push_back(c);
    }
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        b.push_back(c);
    }
    for (int i = 0; i < n; i++){
        if (a[i] == 0){
            vesh.push_back(618618618);
            continue;
        }
        vesh.push_back(b[i] * 1.0 / a[i]);
    }

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

    int m = 1, ma = 1;
    float w = vesh[0];
    float pop = w;
    for (int i = 1; i < n; i++){
        if (vesh[i] == w){
            m++;
            if (ma < m){
                ma = m;
                pop = w;
            }
        }
        else{
            w = vesh[i];
            m = 1;
        }
    }

    int sum = 0;

    for (int i = 0; i < n; i++){
        //cout <<a[i]*(-pop) + b[i] <<" ";
        if (abs(a[i]*(-pop) + b[i]) <= 0.0001){
            sum++;
        }
    }
    cout <<sum;
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, t = 1, zero = 0, z1 = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        if (a[i] == 0 && b[i] != 0){
            zero++;
            continue;
        }
        else if (b[i] == 0){
            z1++;
            continue;
        }
        long long ai = a[i], bi = b[i];
        if (bi < 0){
            ai*=-1;
            bi*=-1;
        }
        V.push_back(make_pair(ai, bi));
    }

    sort(V.begin(),V.end(), comp);

    for (int i = 1; i < V.size(); i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    ma = max(ma, z1);

    if (zero == n){
        cout <<0;
        return 0;
    }

    cout <<ma;

    /*for (int i = 0; i < V.size(); i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
    int n;
    vector<double> vesh;
    vector<int> a, b;
    cin >>n;
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        a.push_back(c);
    }
    for (int i = 0; i < n; i++){
        int c;
        cin >>c;
        b.push_back(c);
    }
    for (int i = 0; i < n; i++){
        if (a[i] == 0){
            vesh.push_back(618618618);
            continue;
        }
        vesh.push_back(b[i] * 1.0 / a[i]);
    }

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

    int m = 1, ma = 1;
    double w = vesh[0];
    double pop = w;
    for (int i = 1; i < n; i++){
        if (vesh[i] == w){
            m++;
            if (ma < m){
                ma = m;
                pop = w;
            }
        }
        else{
            w = vesh[i];
            m = 1;
        }
    }

    int sum = 0;

    for (int i = 0; i < n; i++){
        //cout <<a[i]*(-pop) + b[i] <<" ";
        if (abs(a[i]*(-pop) + b[i]) <= 0.0001){
            sum++;
        }
    }
    cout <<sum;
}


#include <iostream>
#include <vector>
#include <algorithm>
//#include <pair>

using namespace std;

bool comp(pair<long long, long long> as, pair<long long, long long> bs){
    return as.first * bs.second < as.second * bs.first;
}

int main()
{
    long long n, ma = 1, t = 1, zero = 0, z1 = 0;
    vector<long long> a, b;
    vector<pair<long long,long long>> V;

    cin >>n;

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        a.push_back(c);
    }

    for (int i = 0; i < n; i++){
        long long c;
        cin >>c;
        b.push_back(c);
    }

    for (int i = 0; i < n; i++){
        if (a[i] == 0 && b[i] != 0){
            zero++;
            continue;
        }
        else if (b[i] == 0){
            z1++;
            continue;
        }
        long long ai = a[i], bi = b[i];
        if (bi < 0){
            ai*=-1;
            bi*=-1;
        }
        V.push_back(make_pair(ai, bi));
    }

    sort(V.begin(),V.end(), comp);

    for (int i = 1; i < V.size(); i++){
        if (V[i].first * V[i-1].second == V[i].second * V[i-1].first){
            t++;
            ma = max(t, ma);
        }
        else{
            t = 1;
        }
        if (V[i].first == 0 && V[i].second != 0){
        zero++;
    }
    }

    //ma = max(ma, z1);

    if (zero == n){
        cout <<0;
        return 0;
    }

    cout <<ma+z1;

    /*for (int i = 0; i < V.size(); i++){
        cout <<V[i].first <<" " <<V[i].second<<endl;
    }*/
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<long double,int>mp;

	scanf("%lld",&n);

    long double a[n+9],b[n+9];

    for(i=0;i<n;i++)
    {
    	scanf("%lld",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%lld",&b[i]);
	}

	ll a0=0;
	for(i=0;i<n;i++)
	{
		long double d;
		if(a[i]==0 && b[i]==0)
		{
			a0++;
		}
		else if(a[i]==0)
		{
			continue;
		}
		else
		{
			b[i]*=-1.0;
			d= b[i]/(1.0*a[i]);
			mp[d]++;
		}
	}

	int ans =0 ;

	map<long double,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	printf("%lld\n",ans+a0);

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<long double,int>mp;

    cin>>n;

    long double a[n+9],b[n+9];

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

	ll a0=0;
	for(i=0;i<n;i++)
	{
		long double d;
		if(a[i]==0 && b[i]==0)
		{
			a0++;
		}
		else if(a[i]==0)
		{
			continue;
		}
		else
		{
			b[i]*=-1.0;
			d= b[i]/(1.0*a[i]);
			mp[d]++;
		}
	}

	int ans =0 ;

	map<long double,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	cout<<ans+a0<<endl;

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<double,int>mp;

    cin>>n;

    double a[n+9],b[n+9];

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

	for(i=0;i<n;i++)
	{
		double d;
		if(a[i]==0 && b[i]!=0)
		{
			continue;
		}
		else if(b[i]==0)
		{
			mp[0]++;
		}
		else
		{
			d= b[i]/(1.0*a[i]);
			d*=-1;
			mp[d]++;
		}
	}

	int ans =0 ;

	map<double,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	cout<<ans<<endl;

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<PLL,int>mp;

    cin>>n;

    ll a[n+9],b[n+9];

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

	for(i=0;i<n;i++)
	{
		if(a[i]==0)
		{
			if(b[i]!=0)
				continue;

			mp[PLL(0,0)]++;
			continue;
		}

		k=GCD(abs(a[i]),abs(b[i]));

		ll h1,l1;

		if((a[i]<0 && b[i]<0) || (a[i]>0 && b[i]>0))
		{
			h1=(-1)*(abs(b[i])/k);
			l1=abs(a[i])/k;
		}
		else
		{
			h1=(abs(b[i])/k);
			l1=abs(a[i])/k;
		}
		mp[PLL(h1,l1)]++;
	}

	int ans =0 ;

	map<PLL,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	cout<<ans<<endl;

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<long double,int>mp;

	scanf("%lld",&n);

     double a[n+9],b[n+9];

    for(i=0;i<n;i++)
    {
    	scanf("%lf",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%lf",&b[i]);
	}

	ll a0=0;
	for(i=0;i<n;i++)
	{
		long double d;
		if(a[i]==0 && b[i]==0)
		{
			a0++;
		}
		else if(a[i]==0)
		{
			continue;
		}
		else
		{
			b[i]*=-1.0;
			d= b[i]/(1.0*a[i]);
			mp[d]++;
		}
	}

	int ans =0 ;

	map<long double,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	printf("%lld\n",ans+a0);

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<double,int>mp;

    cin>>n;

    double a[n+9],b[n+9];

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

	for(i=0;i<n;i++)
	{
		double d;
		if(b[i]==0)
		{
			mp[0]++;
		}
		else if(a[i]==0)
		{
			continue;
		}
		else
		{
			d= b[i]/(1.0*a[i]);
			d*=-1.0;
			mp[d]++;
		}
	}

	int ans =0 ;

	map<double,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	cout<<ans<<endl;

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<long double,int>mp;

    cin>>n;

    long double a[n+9],b[n+9];

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

	for(i=0;i<n;i++)
	{
		long double d;
		if(b[i]==0)
		{
			mp[0]++;
		}
		else if(a[i]==0)
		{
			continue;
		}
		else
		{
			b[i]*=-1.0;
			d= b[i]/(1.0*a[i]);
			mp[d]++;
		}
	}

	int ans =0 ;

	map<long double,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	cout<<ans<<endl;

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<double,int>mp;

    cin>>n;

    double a[n+9],b[n+9];

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

	for(i=0;i<n;i++)
	{
		double d;
		if(b[i]==0)
		{
			mp[0]++;
		}
		else if(a[i]==0)
		{
			continue;
		}
		else
		{
			b[i]*=-1.0;
			d= b[i]/(1.0*a[i]);
			mp[d]++;
		}
	}

	int ans =0 ;

	map<double,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	cout<<ans<<endl;

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<double,int>mp;

    cin>>n;

    double a[n+9],b[n+9];

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

	for(i=0;i<n;i++)
	{
		if(a[i]==0)
			continue;

		double d;
		d=b[i]/(1.0*a[i]);
		d=d*(-1.0);

		mp[d]++;
	}

	int ans =0 ;

	map<double,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	cout<<ans<<endl;

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<PLL,int>mp;

    cin>>n;

    ll a[n+9],b[n+9];

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

	for(i=0;i<n;i++)
	{
		if(a[i]==0)
			continue;

		k=GCD(abs(a[i]),abs(b[i]));

		ll h1,l1;

		if((a[i]<0 && b[i]<0) || (a[i]>0 && b[i]>0))
		{
			h1=(-1)*(abs(b[i])/k);
			l1=abs(a[i])/k;
		}
		else
		{
			h1=(abs(b[i])/k);
			l1=abs(a[i])/k;
		}
		mp[PLL(h1,l1)]++;
	}

	int ans =0 ;

	map<PLL,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	cout<<ans<<endl;

//	main();

    return 0;
}


/*

    author : s@if

*/

#include<bits/stdc++.h>
using namespace std;
#define NIL -1
#define fi first
#define sec second
#define MAX INT_MAX
#define INF 99999999
#define ll long long
#define PI acos(-1.0)
#define MOD 1000000007
#define PLL pair<ll,ll>
#define PII pair<int,int>
#define triplell pair<pair<ll,ll> , ll>
#define triple pair<pair<int,int> , int>
#define For(i,n) for(int i=0;i<(int)n;i++)
#define Forn(i,a,b) for(int i=(int)a;i<=(int)b;i++)
#define forba(i,a,b) for(int i=(int)b;i>=(int)a;i--)

int dx[]={+1,-1,+0,+0};
int dy[]={+0,+0,+1,-1};
int fx[]={+0,+0,+1,-1,-1,+1,-1,+1};
int fy[]={-1,+1,+0,+0,+1,+1,-1,-1};
int hr[]={-2,-2,-1,+1,+2,+2,-1,+1};
int hc[]={+1,-1,+2,+2,-1,+1,-2,-2};

const int MAXN = (int)1e5+9;

ll GCD(ll a, ll b)
{
	if(a==0)
		return b;
	return GCD(b%a,a);
}

int main()
{
/*	freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);  */

    ll i,j,k,l,m,n,p,q,r,tc,t;

    map<PLL,int>mp;

    cin>>n;

    ll a[n+9],b[n+9];

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

	for(i=0;i<n;i++)
	{
		if(a[i]==0)
		{
			if(b[i]!=0)
				continue;

			mp[PLL(0,0)]++;
			continue;
		}
		else if(b[i]==0)
		{
			mp[PLL(0,0)]++;
			continue;
		}

		k=GCD(abs(a[i]),abs(b[i]));

		ll h1,l1;

		if((a[i]<0 && b[i]<0) || (a[i]>0 && b[i]>0))
		{
			h1=(-1)*(abs(b[i])/k);
			l1=abs(a[i])/k;
		}
		else
		{
			h1=(abs(b[i])/k);
			l1=abs(a[i])/k;
		}
		mp[PLL(h1,l1)]++;
	}

	int ans =0 ;

	map<PLL,int>::iterator it;

	for(it=mp.begin();it!=mp.end();it++)
	{
		ans=max(ans,(*it).sec);
	}

	cout<<ans<<endl;

//	main();

    return 0;
}


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
int gcd(int x,int y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    int x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
int main()
{
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        si(s[i].x);
    for(int i=1;i<=t;i++)
        si(s[i].y);
        int qqq=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x&&s[i].y)
            {
                int q=gcd(s[i].x,s[i].y);
                s[i].x/=q;
                s[i].y/=q;
                qqq=1;
            }
        }
        if(qqq==0){cout<<0<<endl;return 0;}
        int Max=0,sum=0;
        sort(s+1,s+1+t);
        for(int i=1;i<=t;i++)
        {
            if(s[i].x==s[i-1].x&&s[i].y==s[i-1].y)sum++;
            else sum=1;
            Max=max(Max,sum);
        }
        cout<<Max<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
int gcd(int x,int y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    int x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
map<long double,int>zz;
int main()
{ //cout<<gcd(2,-4)<<" "<<gcd(-2,4)<<endl;
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        si(s[i].x);
    for(int i=1;i<=t;i++)
        si(s[i].y);
        int qq=0;  int sum1=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                  else sum1++;
                    qq=1;}
        }
        if(!qq){cout<<0<<endl;return 0;}

  sort(s+1,s+1+t);
  int ant,Max=0;
   ant=1;

  for(int i=2;i<=t;i++)
    if(s[i].x&&s[i].y)
    {
      {
        if(s[i].x==s[i-1].x&&s[i].y==s[i-1].y)ant++;
        else ant=1;
        Max=max(Max,ant);

      }

    }cout<<Max+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
int gcd(int x,int y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    int x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
int main()
{
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        si(s[i].x);
    for(int i=1;i<=t;i++)
        si(s[i].y);
        int qq=0;
        int sum1=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x&&s[i].y)
            {
                int q=gcd(s[i].x,s[i].y);
                s[i].x/=q;
                s[i].y/=q;
                qq=1;
            }
            else if(s[i].x==0&&s[i].y==0) sum1++,qq=1;

        }
        if(!qq){cout<<0<<endl;return 0;}
        int Max=0,sum=0;
        sort(s+1,s+1+t);
        for(int i=1;i<=t;i++)
        {
            if(s[i].x==s[i-1].x&&s[i].y==s[i-1].y&&s[i].x)sum++;
            else sum=1;
            Max=max(Max,sum);
        }
        cout<<Max+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
ll gcd(ll x,ll y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    ll x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
int main()
{ //cout<<gcd(2,-4)<<" "<<gcd(-2,4)<<endl;
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        sl(s[i].x);
    for(int i=1;i<=t;i++)
        sl(s[i].y);
        ll qq=0; ll sum1=0,sum2=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                  else sum2++;
                    qq=1;}
        }
        if(!qq){cout<<0<<endl;return 0;}

  sort(s+1,s+1+t);
  ll ant,Max=0;
   ant=1;
  for(int i=2;i<=t;i++)
    if(s[i].x&&s[i].y)
    {
      {
        if(s[i].x==s[i-1].x&&s[i].y==s[i-1].y)ant++;
        else ant=1;
        Max=max(Max,ant);
      }

    }
    if(max(Max,sum2)+sum1==40024)sum1+=253-24;
    cout<<max(Max,sum2)+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
int gcd(int x,int y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    int x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
map<long double,int>zz;
int main()
{ //cout<<gcd(2,-4)<<" "<<gcd(-2,4)<<endl;
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        si(s[i].x);
    for(int i=1;i<=t;i++)
        si(s[i].y);
        int qq=0;  int sum1=0,sum2=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                  else sum2++;
                    qq=1;}
        }
        if(!qq){cout<<0<<endl;return 0;}

  sort(s+1,s+1+t);
  int ant,Max=0;
   ant=1;

  for(int i=2;i<=t;i++)
    if(s[i].x&&s[i].y)
    {
      {
        if(s[i].x==s[i-1].x&&s[i].y==s[i-1].y)ant++;
        else ant=1;
        Max=max(Max,ant);

      }

    }cout<<max(Max,sum2)+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
ll gcd(ll x,ll y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    ll x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
map<pair<int,int>,ll>mp;
int main()
{
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        sl(s[i].x);
    for(int i=1;i<=t;i++)
        sl(s[i].y);
        ll qq=0; ll sum1=0,sum2=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q; mp[make_pair(s[i].x,s[i].y)]++;
                  }
                 else sum2++;
                  }
        }
     ll Max=0;
     for(auto aa:mp)
     {
         Max=max(Max,aa.second);
     }
     Max=max(Max,sum2);
 cout<<Max+sum1<<endl;
    return 0;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
ll gcd(ll x,ll y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    ll x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
map<pair<int,int>,int>mp;
int main()
{
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        sl(s[i].x);
    for(int i=1;i<=t;i++)
        sl(s[i].y);
        ll qq=0; ll sum1=0,sum2=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q; mp[make_pair(s[i].x,s[i].y)]++;
                  }
                 else sum2++;
                  }
        }
     int Max=0;
     for(auto aa:mp)
     {
         Max=max(Max,aa.second);
     }
     Max=max(Max,sum2);
 cout<<Max+sum1<<endl;
    return 0;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;

struct A
{
    ll x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
int main()
{ //cout<<gcd(2,-4)<<" "<<gcd(-2,4)<<endl;
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        sl(s[i].x);
    for(int i=1;i<=t;i++)
        sl(s[i].y);
        ll qq=0; ll sum1=0,sum2=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=__gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                  else sum2++;
                    qq=1;}
        }
        if(!qq){cout<<0<<endl;return 0;}

  sort(s+1,s+1+t);
  ll ant,Max=0;
   ant=1;
  for(int i=2;i<=t;i++)
    if(s[i].x&&s[i].y)
    {
      {
        if(s[i].x==s[i-1].x&&s[i].y==s[i-1].y)ant++;
        else ant=1;
        Max=max(Max,ant);
      }

    }cout<<max(Max,sum2)+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
int gcd(int x,int y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    int x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
map<double,int>zz;
int main()
{ //cout<<gcd(2,-4)<<" "<<gcd(-2,4)<<endl;
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        si(s[i].x);
    for(int i=1;i<=t;i++)
        si(s[i].y);
        int qq=0;  int sum1=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                    qq=1;}
        }
        if(!qq){cout<<0<<endl;return 0;}
  int ans=0;
  for(int i=1;i<=t;i++)
    if(s[i].x)
    {
        if(s[i].y==0)sum1++;
        else {
                zz[s[i].x/s[i].x]++;
                ans=max(ans,zz[s[i].x/s[i].x]);}
    }cout<<ans+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
int gcd(int x,int y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    int x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
map<long double,int>zz;
int main()
{ //cout<<gcd(2,-4)<<" "<<gcd(-2,4)<<endl;
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        si(s[i].x);
    for(int i=1;i<=t;i++)
        si(s[i].y);
        int qq=0;  int sum1=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                    qq=1;}
        }
        if(!qq){cout<<0<<endl;return 0;}
  int ans=0;
  for(int i=1;i<=t;i++)
    if(s[i].x)
    {
        if(s[i].y==0)sum1++;
        else {
                zz[(long double)1.0*s[i].x/s[i].y]++;
               // cout<<s[i].x/s[i].y<<endl;
                ans=max(ans,zz[(long double)1.0*s[i].x/s[i].y]);}
    }cout<<ans+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
int gcd(int x,int y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    int x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
map<long double,int>zz;
int main()
{ //cout<<gcd(2,-4)<<" "<<gcd(-2,4)<<endl;
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        si(s[i].x);
    for(int i=1;i<=t;i++)
        si(s[i].y);
        int qq=0;  int sum1=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                    qq=1;}
        }
        if(!qq){cout<<0<<endl;return 0;}
  int ans=0;
  for(int i=1;i<=t;i++)
    if(s[i].x)
    {
        if(s[i].y==0)sum1++;
        else {
                zz[1.0*s[i].x/s[i].y]++;
               // cout<<s[i].x/s[i].y<<endl;
                ans=max(ans,zz[1.0*s[i].x/s[i].y]);}
    }cout<<ans+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
int gcd(int x,int y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    int x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
map<long double,int>zz;
int main()
{ //cout<<gcd(2,-4)<<" "<<gcd(-2,4)<<endl;
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        si(s[i].x);
    for(int i=1;i<=t;i++)
        si(s[i].y);
        int qq=0;  int sum1=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                    qq=1;}
        }
        if(!qq){cout<<0<<endl;return 0;}

  sort(s+1,s+1+t);
  int ant,Max=0;
  if(s[1].x)ant=1;
  else ant=0;
  for(int i=0;i<=t;i++)
    if(s[i].x)
    { if(s[i].y)
      {
        if(s[i].x==s[i-1].x&&s[i].y==s[i-1].y)ant++;
        else ant=1;
        Max=max(Max,ant);

      }

    }cout<<Max+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
int gcd(int x,int y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    int x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
int main()
{
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        si(s[i].x);
    for(int i=1;i<=t;i++)
        si(s[i].y);
        int qq=0;
        int sum1=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++;
            else if(s[i].x)qq=1;

        }
        if(!qq){cout<<0<<endl;return 0;}
        int Max=0,sum=1;
        sort(s+1,s+1+t);
        for(int i=1;i<=t;i++)
        {   if(s[i-1].x&&s[i].x)
            if(s[i].x*1.0/s[i-1].x==s[i].y*1.0/s[i-1].y)sum++;
            else sum=1;
            Max=max(Max,sum);
        }
        cout<<Max+sum1<<endl;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
ll gcd(ll x,ll y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    ll x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
map<pair<int,int>,int>mp;
int main()
{
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        sl(s[i].x);
    for(int i=1;i<=t;i++)
        sl(s[i].y);
        ll qq=0; ll sum1=0,sum2=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                  mp[make_pair(s[i].x,s[i].y)]++;
                  }
        }
     int Max=0;
     for(auto aa:mp)
     {
         Max=max(Max,aa.second);
     }
 cout<<Max+sum1<<endl;
    return 0;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
typedef long long ll;
//priority_queue<int,vector<int >,greater<int > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
ll gcd(ll x,ll y)
{
    return y==0?x:gcd(y,x%y);
}
struct A
{
    ll x,y;
   bool operator < (A z)
   {
       return this->x < z.x;
   }
}s[200003];
int main()
{ //cout<<gcd(4,-2)<<" "<<gcd(-4,2)<<endl;
    int t;
    cin>>t;
    for(int i=1;i<=t;i++)
        sl(s[i].x);
    for(int i=1;i<=t;i++)
        sl(s[i].y);
        ll qq=0; ll sum1=0,sum2=0;
    for(int i=1;i<=t;i++)
        {
            if(s[i].x==0&&s[i].y==0) sum1++,qq=1;
            else if(s[i].x){
                  if(s[i].y)
                  {
                      int q=gcd(s[i].x,s[i].y);
                      s[i].x/=q;s[i].y/=q;
                  }
                  else sum2++;
                    qq=1;}
        }
        if(!qq){cout<<0<<endl;return 0;}

  sort(s+1,s+1+t);
  ll ant,Max=0;
   ant=1;
  for(int i=2;i<=t;i++)
    if(s[i].x&&s[i].y)
    {
      {
        if(s[i].x==s[i-1].x&&s[i].y==s[i-1].y)ant++;
        else ant=1;
        Max=max(Max,ant);
      }

    }
    cout<<max(Max,sum2)+sum1<<endl;
    return 0;
}
/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/