Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define REP(i,n) for(ll i = 0; i < (n); ++i)
#define ALL(c) (c).begin(), (c).end()

template<typename F> ld bsearch(ld lower, ld upper, ld k, ll max_loop, F f) {
	if (upper < lower) swap(upper, lower);
	ld nu = upper - lower, nl = 0;
	if (k < f(0)) swap(nl, nu); // ??????????°??????´???
	REP(_, max_loop) {
		ld mid = (nl + nu) / 2;
		(f(mid + lower) > k ? nu : nl) = mid;
	}
	return (nl + nu) / 2 + lower;
}

// ?????°
#define EPS (1e-10)

// ?????????
#define X real()
#define Y imag()
#define SZ size()
#define PB push_back()
#define PREV(x, i) (x[(i+x.SZ-1) % x.SZ])
#define NEXT(x, i) (x[(i + 1) % x.SZ])

// ??????????????£??????
using ld = long double;
template<class T> using CR = const T &;

// ?¬??????¢??°
int sgn(ld a, ld b = 0) {
	if (a > b + EPS) return 1;
	if (a < b - EPS) return -1;
	return 0;
}

///////////////////////

// ???
using P = complex<ld>;
using G = vector<P>; // ???????¨???????
struct L : public vector<P> {
	L(P a, P b) { PB(a); PB(b); }
};

// ????????¢??°
namespace std {
	bool operator < (P a, P b) { return sgn(a.X, b.X) ? a.X < b.X : a.Y < b.Y; }
}

ld dot  (P a, P b) { return (conj(a)*b).X; }
ld cross(P a, P b) { return (conj(a)*b).Y; }

int ccw(P a, P b, P c) { // Verified : AOJCGL1C
	b -= a;
	c -= a;
	if (sgn(cross(b, c))) return sgn(cross(b, c)); // clockwise(-1) or counter clockwise(1)
	if (sgn(dot(b, c)) == -1) return 2;            // c--a--b
	if (sgn(norm(b), norm(c)) == -1) return -2;    // a--b--c
	return 0;                                      // a--c--b
}

bool iLS(CR<L> l, CR<L> s, bool strict = false) {
	int a = sgn(cross(l[1] - l[0], s[0] - l[0]))
	      * sgn(cross(l[1] - l[0], s[1] - l[0]));
	return strict ? a == -1 // strict
	              : a <= 0; // not strict
}
P pLL(CR<L> l, CR<L> m) {
	ld a = cross(l[1] - l[0], m[1] - m[0]);
	ld b = cross(l[1] - l[0], l[1] - m[0]);
	assert(sgn(a)); // parallel or same line
	return m[0] + b / a * (m[1] - m[0]);
}
G convex_cut(CR<G> g, CR<L> l) {
	G q;
	REP(i, g.size()) {
		if (ccw(l[0], l[1], g[i]) != -1) q.PB(g[i]);
		L s = { g[i], NEXT(g,i) };
		if (iLS(l, s, true)) q.PB(pLL(l, s));
	}
	return q;
}
ld area2(CR<G> g) {
	ld s = 0;
	REP(i, g.size()) s += cross(g[i], NEXT(g, i));
	return s;
}
L half_convex(CR<G> g, P p, ld lower, ld upper, ll max_loop) {
	ld ans = bsearch(lower, upper, area2(g) / 2, max_loop, [&](ld x){
		return area2(convex_cut(g, {p, p + polar<ld>(1, x)}));
	});
	
	return {p, p + polar<ld>(max_loop, ans)};
}

int main() {
	while (true) {
		int n;
		cin >> n;
		if (n == 0) break;
		G g(n);
		REP (i, n) cin >> g[i].X >> g[i].Y;
		vector<ld> angles;
		angles.push_back(0);
		angles.push_back(acos(-1));
		REP (i, n) {
			ld angle = arg(g[i]);
			if (angle < 0) angle += acos(-1);
			angles.push_back(angle);
		}
		sort(ALL(angles));
		REP (i, va.size() - 1) {
			L l = half_convex(g, 0, angles[i], angles[i + 1], 1000);
			G cc = convex_cut(g, l);
			if (!sig(area2(g)/2, area2(cc))) {
				printf("%.15Lf %.15Lf\n", l[1].X, l[0].Y);
				break;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc:9:22: error: 'ld' does not name a type; did you mean 'll'?
    9 | template<typename F> ld bsearch(ld lower, ld upper, ld k, ll max_loop, F f) {
      |                      ^~
      |                      ll
a.cc: In constructor 'L::L(P, P)':
a.cc:27:21: error: no matching function for call to 'L::push_back()'
   27 | #define PB push_back()
      |            ~~~~~~~~~^~
a.cc:48:23: note: in expansion of macro 'PB'
   48 |         L(P a, P b) { PB(a); PB(b); }
      |                       ^~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::complex<long double>; _Alloc = std::allocator<std::complex<long double> >; value_type = std::complex<long double>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::complex<long double>; _Alloc = std::allocator<std::complex<long double> >; value_type = std::complex<long double>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 0 provided
a.cc:27:21: error: no matching function for call to 'L::push_back()'
   27 | #define PB push_back()
      |            ~~~~~~~~~^~
a.cc:48:30: note: in expansion of macro 'PB'
   48 |         L(P a, P b) { PB(a); PB(b); }
      |                              ^~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::complex<long double>; _Alloc = std::allocator<std::complex<long double> >; value_type = std::complex<long double>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::complex<long double>; _Alloc = std::allocator<std::complex<long double> >; value_type = std::complex<long double>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 0 provided
a.cc: In function 'G convex_cut(CR<std::vector<std::complex<long double> > >, CR<L>)':
a.cc:27:21: error: no matching function for call to 'std::vector<std::complex<long double> >::push_back()'
   27 | #define PB push_back()
      |                     ^
a.cc:83:52: note: in expansion of macro 'PB'
   83 |                 if (ccw(l[0], l[1], g[i]) != -1) q.PB(g[i]);
      |                                                    ^~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::complex<long double>; _Alloc = std::allocator<std::complex<long double> >; value_type = std::complex<long double>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::complex<long double>; _Alloc = std::allocator<std::complex<long double> >; value_type = std::complex<long double>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 0 provided
a.cc:27:21: error: no matching function for call to 'std::vector<std::complex<long double> >::push_back()'
   27 | #define PB push_back()
      |                     ^
a.cc:85:40: note: in expansion of macro 'PB'
   85 |                 if (iLS(l, s, true)) q.PB(pLL(l, s));
      |                                        ^~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::complex<long double>; _Alloc = std::allocator<std::complex<long double> >; value_type = std::complex<long double>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::complex<long double>; _Alloc = std::allocator<std::complex<long double> >; value_type = std::complex<long double>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 0 provided
a.cc: In function 'L half_convex(CR<std::vector<std::complex<long double> > >, P, ld, ld, ll)':
a.cc:95:26: error: cannot convert 'ld' {aka 'long double'} to 'const void*'
   95 |         ld ans = bsearch(lower, upper, area2(g) / 2, max_loop, [&](ld x){
      |                          ^~~~~
      |                          |
      |                          ld {aka long double}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42:
/usr/include/stdlib.h:960:35: note:   initializing argument 1 of 'void* bsearch(const void*, const void*, size_t, size_t, __compar_fn_t)'
  960 | extern void *bsearch (const void *__key, const void *__base,
      |                       ~~~~~~~~~~~~^~~~~
a.cc: In function 'int main()':
a.cc:108:32: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'long double')
  108 |                 REP (i, n) cin >> g[i].X >> g[i].Y;
      |                            ~~~ ^~
      |                            |
      |                            std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  170 |       operator>>(bool& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:170:7: note:   conversion of argument 1 would be ill-formed:
a.cc:24:15: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'long double'
   24 | #define X real()
      |               ^
a.cc:108:40: note: in expansion of macro 'X'
  108 |                 REP (i, n) cin >> g[i].X >> g[i].Y;
      |                                        ^
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  174 |       operator>>(short& __n);
      |       ^~~~~~~~
/usr/include/c++/14/istream:174:7: note:   conversion of argument 1 would be ill-formed:
a.cc:24:15: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'long double'
   24 | #define X real()
      |               ^
a.cc:108:40: note: in expansion of macro 'X'
  108 |                 REP (i, n) cin >> g[i].X >> g[i].Y;
      |                                        ^
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  177 |       operator>>(unsigned short& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:177:7: note:   conversion of argument 1 would be ill-formed:
a.cc:24:15: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'long double'
   24 | #define X real()
      |               ^
a.cc:108:40: note: in expansion of macro 'X'
  108 |                 REP (i, n) cin >> g[i].X >> g[i].Y;
      |                                        ^
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  181 |       operator>>(int& __n);
      |       ^~~~~~~~
/usr/include/c++/14/istream:181:7: note:   conversion of argument 1 would be ill-formed:
a.cc:24:15: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long double'
   24 | #define X real()
      |               ^
a.cc:108:40: note: in expansion of macro 'X'
  108 |                 REP (i, n) cin >> g[i].X >> g[i].Y;
      |                                        ^
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  184 |       operator>>(unsigned int& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:184:7: note:   conversion of argument 1 would be ill-formed:
a.cc:24:15: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'long double'
   24 | #define X real()
      |               ^
a.cc:108:40: note: in expansion of macro 'X'
  108 |                 REP (i, n) cin >> g[i].X >> g[i].Y;
      |                                        ^
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long