Language: C++

#include<iostream>
#include<complex>
#include<cmath>
#include<vector>
#include<algorithm>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
#define mp         make_pair
#define pb         push_back
#define fir        first
#define sec        second

typedef complex<double> P;
typedef pair<P,P>       Line;

const double eps = 1e-10;
const double pi = acos(-1);
#define EQ(a,b) (fabs(a-b)<eps)
#define EQV(a,b) ( EQ((a).real(),(b).real())&&EQ((a).imag(),(b).imag()))

namespace std{
  bool operator<(const P &a,const P &b){
    if (!(EQ(a.real(),b.real())))return a.real() < b.real();
    else return a.imag() < b.imag();
  }
}

double cross(P a,P b){
  return a.real()*b.imag()-a.imag()*b.real();
}

double distance_lp(P a,P b,P c){
  return fabs(cross(b-a,c-a))/abs(b-a);
}

bool is_intersected_ll(P a1,P a2,P b1,P b2){
  return !(EQ(cross(a1-a2,b1-b2),0.0));
}

P intersection_ll(P a1,P a2,P b1,P b2){
  P a=a2-a1,b=b2-b1;
  return a1+a*cross(b,b1-a1)/cross(b,a);
}

P rot(P a,P b){
  double theta=arg(a);
  double phi=arg(b);
  if (phi < theta)phi+=2*pi;
  phi-=theta;
  phi/=2;
  P ret;
  ret.real()=cos(phi)*a.real()-sin(phi)*a.imag();
  ret.imag()=sin(phi)*a.real()+cos(phi)*a.imag();
  return ret;
}

void  makeall(vector<Line> &a,vector<Line> &b){
  rep(i,1){
    REP(j,i+1,a.size()){
//       cout << a[i].fir<<" " << a[i].sec <<" " 
// 	   << a[j].fir <<" " << a[j].sec << endl;
//       cout << j<<" "<< is_intersected_ll(
// 					 a[i].fir,a[i].sec,
// 					 a[j].fir,a[j].sec)<<
// 	" " << cross(a[i].fir-a[i].sec,a[j].fir-a[j].sec) << endl;
      if (is_intersected_ll(a[i].fir,a[i].sec,a[j].fir,a[j].sec)){
	P tmp = intersection_ll(a[i].fir,a[i].sec,a[j].fir,a[j].sec);
	P at=EQV(a[i].fir,tmp)?a[i].sec:a[i].fir;
	P bt=EQV(a[j].fir,tmp)?a[j].sec:a[j].fir;
	b.pb(mp(tmp,tmp+rot(at-tmp,bt-tmp)));
	b.pb(mp(tmp,tmp+rot(bt-tmp,at-tmp)));
      }else {
	double d=distance_lp(a[i].fir,a[i].sec,a[j].fir)/2.;
	P hoge=a[i].sec-a[i].fir;
	swap(hoge.real(),hoge.imag());
	hoge.real()*=-1;
	hoge/=abs(hoge);
	hoge*=d;
	b.pb(mp(a[i].fir+hoge,a[i].sec+hoge));
	b.pb(mp(a[j].fir+hoge,a[j].sec+hoge));
      }
    }
  }
}

bool check(vector<Line> &a,P &b){
  double tmp = distance_lp(a[0].fir,a[0].sec,b);
  REP(i,1,a.size()){
    if (!(fabs(tmp-distance_lp(a[i].fir,a[i].sec,b))<eps))return false;
  }
  return true;
}

void solve(vector<Line> &a){
  vector<Line> b;
  makeall(a,b);
  P ans;
  int cnt=0;
  rep(i,b.size() && cnt < 2){
    REP(j,i+1,b.size()&&cnt<2){
      if (is_intersected_ll(b[i].fir,b[i].sec,b[j].fir,b[j].sec)){
	P cand=intersection_ll(b[i].fir,b[i].sec,b[j].fir,b[j].sec);
	if (cnt == 1 && abs(ans,cand)<1e-5)continue;
	if (check(a,cand)){
	  ans=cand;
	  cnt++;
	  if (cnt ==2)break;
	}
      }
    }
  }
  
  if (cnt == 0){
    printf("None\n");
  }else if(cnt == 1){
    printf("%.10lf %.10lf\n",ans.real(),ans.imag());
  }else {
    printf("Many\n");
  }
}

main(){
  int n;
  while(cin>>n && n){
    vector<Line> a(n);
    rep(i,n){
      rep(j,2){
	cin>>a[i].fir.real()>>a[i].fir.imag();
	swap(a[i].fir,a[i].sec);
      }
    }

    rep(i,a.size()){
      for(int j=(int)a.size()-1;j>i;j--){
	if(distance_lp(a[i].fir,a[i].sec,a[j].sec)<eps &&
	   distance_lp(a[i].fir,a[i].sec,a[j].fir)<eps){
	  a.erase(a.begin()+j);
	}
      }
    }
    sort(a.begin(),a.end());
    if (a.size() == 1||a.size() ==2){
      printf("Many\n");
    }else solve(a);
  }
  return false;
}

Compiler output:
a.cc: In function 'P rot(P, P)':
a.cc:53:11: error: lvalue required as left operand of assignment
   53 |   ret.real()=cos(phi)*a.real()-sin(phi)*a.imag();
      |   ~~~~~~~~^~
a.cc:54:11: error: lvalue required as left operand of assignment
   54 |   ret.imag()=sin(phi)*a.real()+cos(phi)*a.imag();
      |   ~~~~~~~~^~
a.cc: In function 'void makeall(std::vector<std::pair<std::complex<double>, std::complex<double> > >&, std::vector<std::pair<std::complex<double>, std::complex<double> > >&)':
a.cc:76:13: error: no matching function for call to 'swap(double, double)'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/move.h:226:5: note: candidate: 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = double; _Require<__not_<__is_tuple_like<_Tp> >, is_move_constructible<_Tp>, is_move_assignable<_Tp> > = void]' (near match)
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   conversion of argument 2 would be ill-formed:
a.cc:76:35: error: cannot bind non-const lvalue reference of type 'double&' to an rvalue of type 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |                          ~~~~~~~~~^~
/usr/include/c++/14/bits/exception_ptr.h:229:5: note: candidate: 'void std::__exception_ptr::swap(exception_ptr&, exception_ptr&)'
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
/usr/include/c++/14/bits/exception_ptr.h:229:25: note:   no known conversion for argument 1 from 'double' to 'std::__exception_ptr::exception_ptr&'
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |          ~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/complex:45,
                 from a.cc:2:
/usr/include/c++/14/sstream:1204:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_stringbuf<_CharT, _Traits, _Alloc>&, basic_stringbuf<_CharT, _Traits, _Alloc>&)'
 1204 |     swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/14/sstream:1204:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::__cxx11::basic_stringbuf<_CharT, _Traits, _Alloc>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/sstream:1212:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_istringstream<_CharT, _Traits, _Allocator>&, basic_istringstream<_CharT, _Traits, _Allocator>&)'
 1212 |     swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/14/sstream:1212:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::__cxx11::basic_istringstream<_CharT, _Traits, _Allocator>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/sstream:1219:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_ostringstream<_CharT, _Traits, _Allocator>&, basic_ostringstream<_CharT, _Traits, _Allocator>&)'
 1219 |     swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/14/sstream:1219:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::__cxx11::basic_ostringstream<_CharT, _Traits, _Allocator>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/sstream:1226:5: note: candidate: 'template<class _CharT, class _Traits, class _Allocator> void std::__cxx11::swap(basic_stringstream<_CharT, _Traits, _Allocator>&, basic_stringstream<_CharT, _Traits, _Allocator>&)'
 1226 |     swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
      |     ^~~~
/usr/include/c++/14/sstream:1226:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::__cxx11::basic_stringstream<_CharT, _Traits, _Allocator>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/move.h:250:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> std::__enable_if_t<((bool)std::__is_swappable<_Tp>::value)> std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])'
  250 |     swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm])
      |     ^~~~
/usr/include/c++/14/bits/move.h:250:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types '_Tp [_Nm]' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/stl_pair.h:1089:5: note: candidate: 'template<class _T1, class _T2> typename std::enable_if<std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value>::type std::swap(pair<_T1, _T2>&, pair<_T1, _T2>&)'
 1089 |     swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
      |     ^~~~
/usr/include/c++/14/bits/stl_pair.h:1089:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::pair<_T1, _T2>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1106:5: note: candidate: 'template<class _T1, class _T2> typename std::enable_if<(! std::__and_<std::__is_swappable<_T1>, std::__is_swappable<_T2> >::value)>::type std::swap(pair<_T1, _T2>&, pair<_T1, _T2>&)' (deleted)
 1106 |     swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete;
      |     ^~~~
/usr/include/c++/14/bits/stl_pair.h:1106:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::pair<_T1, _T2>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:4039:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> void std::swap(__cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4039 |     swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~
/usr/include/c++/14/bits/basic_string.h:4039:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2805:5: note: candidate: 'template<class ... _Elements> typename std::enable_if<std::__and_<std::__is_swappable<_Elements>...>::value>::type std::swap(tuple<_UTypes ...>&, tuple<_UTypes ...>&)'
 2805 |     swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y)
      |     ^~~~
/usr/include/c++/14/tuple:2805:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::tuple<_UTypes ...>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/tuple:2823:5: note: candidate: 'template<class ... _Elements> typename std::enable_if<(! std::__and_<std::__is_swappable<_Elements>...>::value)>::type std::swap(tuple<_UTypes ...>&, tuple<_UTypes ...>&)' (deleted)
 2823 |     swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
      |     ^~~~
/usr/include/c++/14/tuple:2823:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::tuple<_UTypes ...>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_vector.h:2122:5: note: candidate: 'template<class _Tp, class _Alloc> void std::swap(vector<_Tp, _Alloc>&, vector<_Tp, _Alloc>&)'
 2122 |     swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
      |     ^~~~
/usr/include/c++/14/bits/stl_vector.h:2122:5: note:   template argument deduction/substitution failed:
a.cc:76:13: note:   mismatched types 'std::vector<_Tp, _Alloc>' and 'double'
   76 |         swap(hoge.real(),hoge.imag());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:77:18: error: lvalue required as left operand of assignment
   77 |         hoge.real()*=-1;
      |         ~~~~~~~~~^~
a.cc: In function 'void solve(std::vector<std::pair<std::complex<double>, std::complex<double> > >&)':
a.cc:104:28: error: no matching function for call to 'abs(P&, P&)'
  104 |         if (cnt == 1 && abs(ans,cand)<1e-5)continue;
      |                         ~~~^~~~~~~~~~
/usr/include/c++/14/complex:892:5: note: candidate: 'template<class _Tp> _Tp std::abs(const complex<_Tp>&)'
  892 |     abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); }
      |     ^~~
/usr/include/c++/14/complex:892:5: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur