#include <bits/stdc++.h>
using namespace std;
class PlaneGame {
public:
int f(vector<int>& x, vector<int>& y)
{
int n = x.size();
double pi = 4.0*atan(1.0);
vector<int> xx(n), yy(n);
int b = 0;
for (int i = 0; i < n; i++)
{
double ang;
if (x[i] == 0)
ang = pi/2.0;
else
ang = atan(y[i]/x[i]);
ang = 2*pi-ang;
for (int j = 0; j < n; j++)
{
xx[j] = x[j]*cos(ang)-y[j]*sin(ang);
yy[j] = y[j]*cos(ang)+x[j]*sin(ang);
}
int t = 0;
for (int j = 0; j < n; j++)
{
if (abs(xx[j]) <= 1.0e-8 || abs(yy[j]) <= 1.0e-8)
t++;
}
b = max(b, t);
}
return b;
}
int bestShot(vector <int> x, vector <int> y)
{
int n = x.size();
int m = 0;
for (int i = 0; i < n; i++)
{
vector<int> xx = x, yy = y;
for (int j = 0; j < n; j++)
{
xx[j] -= x[i];
yy[j] -= y[i];
}
m = max(m, f(xx, yy));
}
return m;
}
};
int main()
{
PlaneGame obj;
vector<int> x;
vector<int> y;
x.push_back(1);x.push_back(1);x.push_back(-1);x.push_back(-1);
y.push_back(1);y.push_back(-1);y.push_back(-1);y.push_back(1);
cout << obj.bestShot(x, y) << endl;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgpjbGFzcyBQbGFuZUdhbWUgeyAKcHVibGljOiAKCmludCBmKHZlY3RvcjxpbnQ+JiB4LCB2ZWN0b3I8aW50PiYgeSkgCnsgCiAgICBpbnQgbiA9IHguc2l6ZSgpOyAKICAgIGRvdWJsZSBwaSA9IDQuMCphdGFuKDEuMCk7IAogICAgdmVjdG9yPGludD4geHgobiksIHl5KG4pOyAKICAgICAKICAgIGludCBiID0gMDsgCiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykgCiAgICB7IAogICAgICAgIGRvdWJsZSBhbmc7IAogICAgICAgIGlmICh4W2ldID09IDApIAogICAgICAgICAgICBhbmcgPSBwaS8yLjA7IAogICAgICAgIGVsc2UgCiAgICAgICAgICAgIGFuZyA9IGF0YW4oeVtpXS94W2ldKTsgCiAgICAgICAgYW5nID0gMipwaS1hbmc7IAogICAgICAgIGZvciAoaW50IGogPSAwOyBqIDwgbjsgaisrKSAKICAgICAgICB7IAogICAgICAgICAgICB4eFtqXSA9IHhbal0qY29zKGFuZykteVtqXSpzaW4oYW5nKTsgCiAgICAgICAgICAgIHl5W2pdID0geVtqXSpjb3MoYW5nKSt4W2pdKnNpbihhbmcpOyAKICAgICAgICB9IAogICAgICAgIGludCB0ID0gMDsgCiAgICAgICAgZm9yIChpbnQgaiA9IDA7IGogPCBuOyBqKyspIAogICAgICAgIHsgCiAgICAgICAgICAgIGlmIChhYnMoeHhbal0pIDw9IDEuMGUtOCB8fCBhYnMoeXlbal0pIDw9IDEuMGUtOCkgCiAgICAgICAgICAgICAgICB0Kys7IAogICAgICAgIH0gCiAgICAgICAgYiA9IG1heChiLCB0KTsgCiAgICB9IAogICAgIAogICAgcmV0dXJuIGI7IAogICAgIAp9IAoKaW50IGJlc3RTaG90KHZlY3RvciA8aW50PiB4LCB2ZWN0b3IgPGludD4geSkgIAp7IAogICAgaW50IG4gPSB4LnNpemUoKTsgCiAgICBpbnQgbSA9IDA7IAogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspIAogICAgeyAKICAgICAgICB2ZWN0b3I8aW50PiB4eCA9IHgsIHl5ID0geTsgCiAgICAgICAgZm9yIChpbnQgaiA9IDA7IGogPCBuOyBqKyspIAogICAgICAgIHsgCiAgICAgICAgICAgIHh4W2pdIC09IHhbaV07IAogICAgICAgICAgICB5eVtqXSAtPSB5W2ldOyAKICAgICAgICB9IAogICAgICAgIG0gPSBtYXgobSwgZih4eCwgeXkpKTsgCiAgICB9IAogICAgcmV0dXJuIG07ICAgICAgICAgCn0gCn07CgppbnQgbWFpbigpCnsKCVBsYW5lR2FtZSBvYmo7Cgl2ZWN0b3I8aW50PiB4OwoJdmVjdG9yPGludD4geTsKCXgucHVzaF9iYWNrKDEpO3gucHVzaF9iYWNrKDEpO3gucHVzaF9iYWNrKC0xKTt4LnB1c2hfYmFjaygtMSk7Cgl5LnB1c2hfYmFjaygxKTt5LnB1c2hfYmFjaygtMSk7eS5wdXNoX2JhY2soLTEpO3kucHVzaF9iYWNrKDEpOwoJY291dCA8PCBvYmouYmVzdFNob3QoeCwgeSkgPDwgZW5kbDsKCXJldHVybiAwOwp9