/*
*牛客讨论和提交链接:https://www.nowcoder.com/questionTerminal/d3f26db0325444078717cc802e0056d8
*注意垂直时不要用(y2-y0)/(x2-x0) == (y1-y0)/(x1-x0)这种判断,因为被除数可能为0
*/
#include <bits/stdc++.h>
using namespace std;
const int maxn = 50+5;
int x[maxn], y[maxn];
int n;
int solve(){
int res = 1;
if (n <= 2)
return n;
for (int i=0; i<n; i++) {
for (int j=0; j<n; j++) {
if (i != j){
int dx1 = x[j] - x[i];
int dy1 = y[j] - y[i];
for (int k=0; k<n; k++) {
int count = 0;
if (k != i && k != j){
for (int r=0; r<n; r++) {
int dx2 = x[r] - x[i];
int dy2 = y[r] - y[i];
if (dy1*dx2 == dx1*dy2) {
count++;
}else{
dx2 = x[r] - x[k];
dy2 = y[r] - y[k];
if (dy1*dy2 == -dx1*dx2) {
count++;
}
}
}
}
res = max(res, count);
}
}
}
}
return res;
}
int main()
{
scanf ("%d", &n);
for (int i=0; i<n; i++){
scanf ("%d", &x[i]);
}
for (int i=0; i<n; i++){
scanf ("%d", &y[i]);
}
printf ("%d\n", solve());
return 0;
}