x和y的差相同的都在一条直线上(斜率为1) x和y的和相同的都在一条直线上(斜率为1)
证明: 有两个点(x1,y1)(x2,y2) (y1-y2)/(x1-x2)=1 可得y1-x1 = y2-x2 (y1-y2)/(x1-x2)=-1 可得y1+x1 = y2+x2
枚举每一种差和每一种和,看对多的点的个数
n = int(input())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
b1 = defaultdict(set)
b2 = defaultdict(set)
for i in range(n):
b1[x[i]-y[i]].add(i)
b2[x[i]+y[i]].add(i)
res = []
for i in b1.keys():
for j in b2.keys():
res.append(len(b1[i]|b2[j]))
print(max(res))