#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; // using Int = long long; template ostream &operator<<(ostream &os, const pair &a) { return os << "(" << a.first << ", " << a.second << ")"; }; template ostream &operator<<(ostream &os, const vector &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; } template void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; } template bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; } template bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; } #ifndef LIBRA_OTHER_INT128_H_ #define LIBRA_OTHER_INT128_H_ #include #include constexpr unsigned __int128 toUInt128(const char *s) { unsigned __int128 x = 0; for (; *s; ++s) x = x * 10 + (*s - '0'); return x; } constexpr __int128 toInt128(const char *s) { if (*s == '-') return -toInt128(s + 1); __int128 x = 0; for (; *s; ++s) x = x * 10 + (*s - '0'); return x; } unsigned __int128 inUInt128() { static char buf[41]; scanf("%s", buf); return toUInt128(buf); } __int128 inInt128() { static char buf[41]; scanf("%s", buf); return toInt128(buf); } void out(unsigned __int128 x) { static char buf[41]; int len = 0; do { buf[len++] = '0' + static_cast(x % 10); } while (x /= 10); for (int i = len; --i >= 0; ) putchar(buf[i]); } void out(__int128 x) { if (x < 0) { putchar('-'); out(-static_cast(x)); } else { out(static_cast(x)); } } std::ostream &operator<<(std::ostream &os, unsigned __int128 x) { static char buf[41]; int len = 0; do { buf[len++] = '0' + static_cast(x % 10); } while (x /= 10); for (int i = len; --i >= 0; ) os << buf[i]; return os; } std::ostream &operator<<(std::ostream &os, __int128 x) { if (x < 0) { os << '-' << -static_cast(x); } else { os << static_cast(x); } return os; } #endif // LIBRA_OTHER_INT128_H_ using Int = __int128; int sig(Int r) { return (r < 0) ? -1 : (r > 0) ? +1 : 0; } struct Pt { Int x, y; Pt() : x(0), y(0) {} Pt(Int x_, Int y_) : x(x_), y(y_) {} Pt operator+(const Pt &a) const { return Pt(x + a.x, y + a.y); } Pt operator-(const Pt &a) const { return Pt(x - a.x, y - a.y); } Pt operator*(const Pt &a) const { return Pt(x * a.x - y * a.y, x * a.y + y * a.x); } Pt operator+() const { return Pt(+x, +y); } Pt operator-() const { return Pt(-x, -y); } Pt operator*(const Int &k) const { return Pt(x * k, y * k); } Pt operator/(const Int &k) const { return Pt(x / k, y / k); } friend Pt operator*(const Int &k, const Pt &a) { return Pt(k * a.x, k * a.y); } Pt &operator+=(const Pt &a) { x += a.x; y += a.y; return *this; } Pt &operator-=(const Pt &a) { x -= a.x; y -= a.y; return *this; } Pt &operator*=(const Pt &a) { return *this = *this * a; } Pt &operator*=(const Int &k) { x *= k; y *= k; return *this; } Int abs2() const { return x * x + y * y; } Int dot(const Pt &a) const { return x * a.x + y * a.y; } Int det(const Pt &a) const { return x * a.y - y * a.x; } bool operator==(const Pt &a) const { return (x == a.x && y == a.y); } bool operator<(const Pt &a) const { return (x < a.x || (x == a.x && y < a.y)); } friend ostream &operator<<(ostream &os, const Pt &a) { os << "(" << a.x << ", " << a.y << ")"; return os; } }; Int tri(const Pt &a, const Pt &b, const Pt &c) { return (b - a).det(c - a); } // [0, 2 PI) int cmpArg(const Pt &a, const Pt &b) { const int sa = (a.y > 0) ? 1 : (a.y < 0) ? 3 : (a.x > 0) ? 0 : 2; const int sb = (b.y > 0) ? 1 : (b.y < 0) ? 3 : (b.x > 0) ? 0 : 2; return (sa < sb) ? -1 : (sa > sb) ? +1 : sig(b.det(a)); } int N; vector P; int main() { for (; ~scanf("%d", &N); ) { P.resize(N); for (int u = 0; u < N; ++u) { P[u].x = inInt128(); P[u].y = inInt128(); } vector ans(N, 0); for (int u = 0; u < N; ++u) { using Entry = pair; vector es; for (int v = 0; v < N; ++v) if (u != v) { es.emplace_back(P[v] - P[u], v); } sort(es.begin(), es.end(), [&](const Entry &e0, const Entry &e1) -> bool { const int s = cmpArg(e0.first, e1.first); if (s) return (s < 0); return (e0.first.abs2() < e1.first.abs2()); }); for (int i = 0, j; i < N - 1; i = j) { for (j = i + 1; j < N - 1 && !cmpArg(es[i].first, es[j].first); ++j) {} if (j - i >= 2) { ans[u] = 1; } } } // cerr<<"ans = "<