Problem:
Problem C: Find the Point

We understand that reading English is a great pain to many of you. So we’ll keep this problem statememt
simple. Write a program that reports the point equally distant from a set of lines given as the input. In
case of no solutions or multiple solutions, your program should report as such.

Input

The input consists of multiple datasets. Each dataset is given in the following format:

n

x1,1 y1,1 x1,2 y1,2

x2,1 y2,1 x2,2 y2,2

...

xn,1 yn,1 xn,2 yn,2

n is the number of lines (1 ≤ n ≤ 100); (xi,1, yi,1) and (xi,2, yi,2) denote the different points the i-th line passes through. The lines do not coincide each other. The coordinates are all integers between -10000
and 10000.

The last dataset is followed by a line containing one zero. This line is not a part of any dataset and should not be processed.

Output

For each dataset, print a line as follows. If there is exactly one point equally distant from all the given lines, print the x- and y-coordinates in this order with a single space between them. If there is more than one such point,
just print "Many" (without quotes). If there is none, just print "None" (without quotes).

The coordinates may be printed with any number of digits after the decimal point, but should be accurate
to 10-4.

Sample Input

2
-35 -35 100 100
-49 49 2000 -2000
4
0 0 0 3
0 0 3 0
0 3 3 3
3 0 3 3
4
0 3 -4 6
3 0 6 -4
2 3 6 6
-1 2 -4 6
0

Output for the Sample Input

Many
1.5000 1.5000
1.000 1.000

Solution in C++14 (judge verdict: Wrong Answer)

#include <iostream>
#include <complex>
#include <cstdio>
#include <utility>
#include <algorithm>
#include <vector>
using namespace std;
typedef complex<long double> P;
typedef pair<P,P> L;
#define X real()
#define Y imag()
#define EPS (1e-10)

namespace std{
  bool operator<(const P& a, const P& b){
    return a.X != b.X ? a.X < b.X : a.Y < b.Y;
  }
}

long double dot(P a, P b){return a.X * b.X + a.Y * b.Y;}
long double cross(P a, P b){return a.X * b.Y - a.Y * b.X;}

P intersection(L a, L b){
  //直線aと直線bの交点
  return a.first + cross(b.second-b.first,a.first-b.first)/(-cross(b.second-b.first,a.second-b.first)+cross(b.second-b.first,a.first-b.first))*(a.second-a.first);
}

long double p_to_l_dist(P a, L s){
  return abs(cross(s.first-s.second,a-s.second))/abs(s.first-s.second);
}

L angle_bisector(P a, P b, P c){
  //角abcをの二等分線
  //a, b or b, cが一致するとゼロ徐算が発生しREになる
  P p = b + (a-b)/abs(a-b) + (c-b)/abs(c-b);
  return L(b,p);
}

P n_vector(P a){
  //aベクトルに垂直な単位ベクトル
  long double l = abs(a);
  return P(-a.Y,a.X)/l;
}

int main(){
  int n;
  while(cin >> n, n){
    long double x1, x2, y1, y2;
    vector<L> V;
    for(int i = 0; i < n; ++i){
      cin >> x1 >> y1 >> x2 >> y2;
      V.emplace_back(P(x1,y1),P(x2,y2));
    }
    if(n < 3){
      cout << "Many" << endl;
      continue;
    }
    vector<L> A, B;
    for(int i = 0; i < n; ++i){
      for(int j = i+1; j < n; ++j){
        if(abs(cross(V[i].first-V[i].second,V[j].first-V[j].second)) < EPS){
          A.emplace_back((V[i].first+V[j].first)/(long double)2.0,(V[i].second+V[j].second)/(long double)2.0);
          B.emplace_back(A.back());
        }else{
          P c = intersection(V[i],V[j]);
          if(abs(c-V[i].first) > EPS && abs(c-V[j].first) > EPS){
            A.push_back(angle_bisector(V[i].first,c,V[j].first));
          }else if(abs(c-V[i].first) > EPS){
            A.push_back(angle_bisector(V[i].first,c,V[j].second));
          }else if(abs(c-V[j].first) > EPS){
            A.push_back(angle_bisector(V[i].second,c,V[j].first));
          }else{
            A.push_back(angle_bisector(V[i].second,c,V[j].second));
          }
          P a = A.back().first, v = n_vector(A.back().second-a);
          B.emplace_back(a,a+v);
        }
      }
    }
    if(A.size() < 2){
      cout << "Many" << endl;
      continue;
    }
    vector<P> C, D;
    for(int i = 1; i < A.size(); ++i){
      if(abs(cross(A[0].first-A[0].second,A[i].first-A[i].second)) > EPS){
        C.push_back(intersection(A[0],A[i]));
      }
      if(abs(cross(A[0].first-A[0].second,B[i].first-B[i].second)) > EPS){
        C.push_back(intersection(A[0],B[i]));
      }
      if(abs(cross(B[0].first-B[0].second,A[i].first-A[i].second)) > EPS){
        C.push_back(intersection(B[0],A[i]));
      }
      if(abs(cross(B[0].first-B[0].second,B[i].first-B[i].second)) > EPS){
        C.push_back(intersection(B[0],B[i]));
      }
    }
    sort(C.begin(),C.end());
    for(int i = 0; i < C.size(); ++i){
      P c = C[i];
      long double d = p_to_l_dist(c,V[0]);
      bool f = true;
      for(int j = 0; j < n; ++j){
        if(abs(p_to_l_dist(c,V[j]) - d) > EPS){
          f = false;
          break;
        }
      }
      if(f && (D.empty() || abs(D.back()-c) > EPS)){
        D.push_back(c);
        if(D.size() > 1) break;
      }
    }
    if(D.empty()) cout << "None" << endl;
    else if(D.size() == 1) printf("%.5Lf %.5Lf\n",D[0].X,D[0].Y);
    else cout << "Many" << endl;
  }
  return 0;
}