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
x
1,1
y
1,1
x
1,2
y
1,2
x
2,1
y
2,1
x
2,2
y
2,2
...
x
n
,1
y
n
,1
x
n
,2
y
n
,2
n
is the number of lines (1 ≤
n
≤ 100); (
x
i
,1
,
y
i
,1
) and (
x
i
,2
,
y
i
,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

Submitted solutions:

code_snippet: #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define EPS (1e-6)
#define equals(a, b) (fabs((a) - (b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
using namespace std;
class Point {
public:
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) { return Point(x - p.x, y - p.y); }
  Point operator*(double a) { return Point(a * x, a * y); }
  Point operator/(double a) { return Point(x / a, y / a); }
  Point operator*(Point a) {
    return Point(x * a.x - y * a.y, x * a.y + y * a.x);
  }
  bool operator<(const Point &p) const {
    return !equals(x, p.x) ? x < p.x : (!equals(y, p.y) && y < p.y);
  }
  bool operator==(const Point &p) const {
    return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
  }
};
struct Segment {
  Point p1, p2;
  int index;
  Segment(Point p1 = Point(), Point p2 = Point(), int index = -1)
      : p1(p1), p2(p2), index(index) {}
  bool operator<(const Segment &s) const {
    return (p2 == s.p2) ? p1 < s.p1 : p2 < s.p2;
  }
  bool operator==(const Segment &s) const {
    return (s.p1 == p1 && s.p2 == p2) || (s.p1 == p2 && s.p2 == p1);
  }
};
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
double dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
double norm(Point a) { return a.x * a.x + a.y * a.y; }
double abs(Point a) { return sqrt(norm(a)); }
Point rotate(Point a, double rad) {
  return Point(cos(rad) * a.x - sin(rad) * a.y,
               sin(rad) * a.x + cos(rad) * a.y);
}
double toRad(double agl) { return agl * M_PI / 180.0; }
double getArg(Point a, Point b, Point c) {
  double arg1 = atan2(b.y - a.y, b.x - a.x);
  double arg2 = atan2(c.y - b.y, c.x - b.x);
  double arg = fabs(arg1 - arg2);
  while (arg > M_PI)
    arg -= 2.0 * M_PI;
  return fabs(arg);
}
int ccw(Point p0, Point p1, Point p2) {
  Point a = p1 - p0;
  Point b = p2 - p0;
  if (cross(a, b) > EPS)
    return COUNTER_CLOCKWISE;
  if (cross(a, b) < -EPS)
    return CLOCKWISE;
  if (dot(a, b) < -EPS)
    return ONLINE_BACK;
  if (norm(a) < norm(b))
    return ONLINE_FRONT;
  return ON_SEGMENT;
}
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2 - l.p1, m.p2 - m.p1)) > EPS ||
         abs(cross(l.p2 - l.p1, m.p1 - l.p1)) < EPS;
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2 - l.p1, s.p1 - l.p1) * cross(l.p2 - l.p1, s.p2 - l.p1) <
         EPS;
}
bool intersectLP(Line l, Point p) {
  return abs(cross(l.p2 - p, l.p1 - p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1, s.p2, t.p1) * ccw(s.p1, s.p2, t.p2) <= 0 &&
         ccw(t.p1, t.p2, s.p1) * ccw(t.p1, t.p2, s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1 - p) + abs(s.p2 - p) - abs(s.p2 - s.p1) < EPS;
}
Point projection(Line l, Point p) {
  double t = dot(p - l.p1, l.p1 - l.p2) / norm(l.p1 - l.p2);
  return l.p1 + (l.p1 - l.p2) * t;
}
Point reflection(Line l, Point p) { return p + (projection(l, p) - p) * 2; }
double distanceLP(Line l, Point p) { return abs(p - projection(l, p)); }
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s))
    return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r))
    return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t))
    return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
Point crosspoint(Line l, Line m) {
  double A = cross(l.p2 - l.p1, m.p2 - m.p1);
  double B = cross(l.p2 - l.p1, l.p2 - m.p1);
  if (abs(A) < EPS && abs(B) < EPS) {
    vector<Point> vec;
    vec.push_back(l.p1), vec.push_back(l.p2), vec.push_back(m.p1),
        vec.push_back(m.p2);
    sort(vec.begin(), vec.end());
    assert(vec[1] == vec[2]);
    return vec[1];
  }
  if (abs(A) < EPS)
    assert(false);
  return m.p1 + (m.p2 - m.p1) * (B / A);
}
double cross3p(Point p, Point q, Point r) {
  return (r.x - q.x) * (p.y - q.y) - (r.y - q.y) * (p.x - q.x);
}
bool collinear(Point p, Point q, Point r) {
  return fabs(cross3p(p, q, r)) < EPS;
}
bool ccwtest(Point p, Point q, Point r) { return cross3p(p, q, r) > 0; }
bool onSegment(Point p, Point q, Point r) {
  return collinear(p, q, r) &&
         equals(sqrt(pow(p.x - r.x, 2) + pow(p.y - r.y, 2)) +
                    sqrt(pow(r.x - q.x, 2) + pow(r.y - q.y, 2)),
                sqrt(pow(p.x - q.x, 2) + pow(p.y - q.y, 2)));
}
Line calcLine(Line line1, Line line2, Point p1, Point p2) {
  Point cp = crosspoint(line1, line2);
  int res = ccw(cp, p1, p2);
  Point base;
  if (res == COUNTER_CLOCKWISE)
    base = p1;
  else
    base = p2;
  Point not_base = (base == p1) ? p2 : p1;
  double arg_a = (toRad(180.0) - getArg(base, cp, not_base));
  Vector e = (base - cp) / abs(base - cp);
  e = rotate(e, arg_a / 2.0);
  Line tmp = Line(cp, cp + e * 100);
  return tmp;
}
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec) {
  if (vec.size() <= 2) {
    cout << MANY << endl;
    return;
  }
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i, n) REP(j, i + 1, n) {
    if (equals(cross(vec[i].p1 - vec[i].p2, vec[j].p1 - vec[j].p2), 0.0)) {
      Vector e = (vec[i].p2 - vec[i].p1) / abs(vec[i].p2 - vec[i].p1);
      e = rotate(e, toRad(90));
      Line line = Line(vec[i].p1, vec[i].p1 + e * 100);
      Point cp1 = crosspoint(line, vec[i]);
      Point cp2 = crosspoint(line, vec[j]);
      Point mp = (cp1 + cp2) / 2.0;
      e = (vec[i].p2 - vec[i].p1) / abs(vec[i].p2 - vec[i].p1);
      line = Line(mp, mp + e * 100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i], vec[j]);
      Point I = (vec[i].p1 == cp) ? vec[i].p2 : vec[i].p1;
      Point J = (vec[j].p1 == cp) ? vec[j].p2 : vec[j].p1;
      Vector e1 = (I - cp) / abs(I - cp);
      Vector e2 = (J - cp) / abs(J - cp);
      Line tmp = calcLine(vec[i], vec[j], cp + e1 * 100, cp + e2 * 100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i], vec[j], cp + e1 * 100, cp - e2 * 100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if (candidateLines.size() >= 20)
      break;
  }
  vector<Point> candidatePoints;
  rep(i, candidateLines.size()) REP(j, i + 1, candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if (equals(cross(line1.p1 - line1.p2, line2.p1 - line2.p2), 0.0))
      continue;
    Point cp = crosspoint(line1, line2);
    candidatePoints.push_back(cp);
  }
  vector<Point> &v = candidatePoints;
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  vector<Point> answer;
  rep(i, candidatePoints.size()) {
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j, vec.size()) {
      double tmp = distanceLP(vec[j], p);
      if (equals(dist, -1))
        dist = tmp;
      else if (!equals(dist, tmp)) {
        success = false;
        break;
      }
    }
    if (success)
      answer.push_back(p);
    if (answer.size() >= 2)
      break;
  }
  if (answer.size() == 1)
    printf("%.10f %.10f\n", answer[0].x, answer[0].y);
  else if (answer.empty())
    cout << NONE << endl;
  else
    cout << MANY << endl;
}
int main() {
  int n;
  while (cin >> n, n) {
    vector<Line> vec(n);
    rep(i, n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 10
memory_kb: 4288
final_rank: 13

code_snippet: #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define EPS (1e-6)
#define equals(a, b) (fabs((a) - (b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
using namespace std;
class Point {
public:
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) { return Point(x - p.x, y - p.y); }
  Point operator*(double a) { return Point(a * x, a * y); }
  Point operator/(double a) { return Point(x / a, y / a); }
  Point operator*(Point a) {
    return Point(x * a.x - y * a.y, x * a.y + y * a.x);
  }
  bool operator<(const Point &p) const {
    return !equals(x, p.x) ? x < p.x : (!equals(y, p.y) && y < p.y);
  }
  bool operator==(const Point &p) const {
    return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
  }
};
struct Segment {
  Point p1, p2;
  int index;
  Segment(Point p1 = Point(), Point p2 = Point(), int index = -1)
      : p1(p1), p2(p2), index(index) {}
  bool operator<(const Segment &s) const {
    return (p2 == s.p2) ? p1 < s.p1 : p2 < s.p2;
  }
  bool operator==(const Segment &s) const {
    return (s.p1 == p1 && s.p2 == p2) || (s.p1 == p2 && s.p2 == p1);
  }
};
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
double dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
double norm(Point a) { return a.x * a.x + a.y * a.y; }
double abs(Point a) { return sqrt(norm(a)); }
Point rotate(Point a, double rad) {
  return Point(cos(rad) * a.x - sin(rad) * a.y,
               sin(rad) * a.x + cos(rad) * a.y);
}
double toRad(double agl) { return agl * M_PI / 180.0; }
double getArg(Point a, Point b, Point c) {
  double arg1 = atan2(b.y - a.y, b.x - a.x);
  double arg2 = atan2(c.y - b.y, c.x - b.x);
  double arg = fabs(arg1 - arg2);
  while (arg > M_PI)
    arg -= 2.0 * M_PI;
  return fabs(arg);
}
int ccw(Point p0, Point p1, Point p2) {
  Point a = p1 - p0;
  Point b = p2 - p0;
  if (cross(a, b) > EPS)
    return COUNTER_CLOCKWISE;
  if (cross(a, b) < -EPS)
    return CLOCKWISE;
  if (dot(a, b) < -EPS)
    return ONLINE_BACK;
  if (norm(a) < norm(b))
    return ONLINE_FRONT;
  return ON_SEGMENT;
}
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2 - l.p1, m.p2 - m.p1)) > EPS ||
         abs(cross(l.p2 - l.p1, m.p1 - l.p1)) < EPS;
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2 - l.p1, s.p1 - l.p1) * cross(l.p2 - l.p1, s.p2 - l.p1) <
         EPS;
}
bool intersectLP(Line l, Point p) {
  return abs(cross(l.p2 - p, l.p1 - p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1, s.p2, t.p1) * ccw(s.p1, s.p2, t.p2) <= 0 &&
         ccw(t.p1, t.p2, s.p1) * ccw(t.p1, t.p2, s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1 - p) + abs(s.p2 - p) - abs(s.p2 - s.p1) < EPS;
}
Point projection(Line l, Point p) {
  double t = dot(p - l.p1, l.p1 - l.p2) / norm(l.p1 - l.p2);
  return l.p1 + (l.p1 - l.p2) * t;
}
Point reflection(Line l, Point p) { return p + (projection(l, p) - p) * 2; }
double distanceLP(Line l, Point p) { return abs(p - projection(l, p)); }
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s))
    return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r))
    return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t))
    return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
Point crosspoint(Line l, Line m) {
  double A = cross(l.p2 - l.p1, m.p2 - m.p1);
  double B = cross(l.p2 - l.p1, l.p2 - m.p1);
  if (abs(A) < EPS && abs(B) < EPS) {
    vector<Point> vec;
    vec.push_back(l.p1), vec.push_back(l.p2), vec.push_back(m.p1),
        vec.push_back(m.p2);
    sort(vec.begin(), vec.end());
    assert(vec[1] == vec[2]);
    return vec[1];
  }
  if (abs(A) < EPS)
    assert(false);
  return m.p1 + (m.p2 - m.p1) * (B / A);
}
double cross3p(Point p, Point q, Point r) {
  return (r.x - q.x) * (p.y - q.y) - (r.y - q.y) * (p.x - q.x);
}
bool collinear(Point p, Point q, Point r) {
  return fabs(cross3p(p, q, r)) < EPS;
}
bool ccwtest(Point p, Point q, Point r) { return cross3p(p, q, r) > 0; }
bool onSegment(Point p, Point q, Point r) {
  return collinear(p, q, r) &&
         equals(sqrt(pow(p.x - r.x, 2) + pow(p.y - r.y, 2)) +
                    sqrt(pow(r.x - q.x, 2) + pow(r.y - q.y, 2)),
                sqrt(pow(p.x - q.x, 2) + pow(p.y - q.y, 2)));
}
Line calcLine(Line line1, Line line2, Point p1, Point p2) {
  Point cp = crosspoint(line1, line2);
  int res = ccw(cp, p1, p2);
  Point base;
  if (res == COUNTER_CLOCKWISE)
    base = p1;
  else
    base = p2;
  Point not_base = (base == p1) ? p2 : p1;
  double arg_a = (toRad(180.0) - getArg(base, cp, not_base));
  Vector e = (base - cp) / abs(base - cp);
  e = rotate(e, arg_a / 2.0);
  Line tmp = Line(cp, cp + e * 100);
  return tmp;
}
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec) {
  if (vec.size() <= 2) {
    cout << MANY << endl;
    return;
  }
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i, n) REP(j, i + 1, n) {
    if (equals(cross(vec[i].p1 - vec[i].p2, vec[j].p1 - vec[j].p2), 0.0)) {
      Vector e = (vec[i].p2 - vec[i].p1) / abs(vec[i].p2 - vec[i].p1);
      e = rotate(e, toRad(90));
      Line line = Line(vec[i].p1, vec[i].p1 + e * 100);
      Point cp1 = crosspoint(line, vec[i]);
      Point cp2 = crosspoint(line, vec[j]);
      Point mp = (cp1 + cp2) / 2.0;
      e = (vec[i].p2 - vec[i].p1) / abs(vec[i].p2 - vec[i].p1);
      line = Line(mp, mp + e * 100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i], vec[j]);
      Point I = (vec[i].p1 == cp) ? vec[i].p2 : vec[i].p1;
      Point J = (vec[j].p1 == cp) ? vec[j].p2 : vec[j].p1;
      Vector e1 = (I - cp) / abs(I - cp);
      Vector e2 = (J - cp) / abs(J - cp);
      Line tmp = calcLine(vec[i], vec[j], cp + e1 * 100, cp + e2 * 100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i], vec[j], cp + e1 * 100, cp - e2 * 100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if (candidateLines.size() >= 10)
      break;
  }
  vector<Point> candidatePoints;
  rep(i, candidateLines.size()) REP(j, i + 1, candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if (equals(cross(line1.p1 - line1.p2, line2.p1 - line2.p2), 0.0))
      continue;
    Point cp = crosspoint(line1, line2);
    candidatePoints.push_back(cp);
  }
  vector<Point> &v = candidatePoints;
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  vector<Point> answer;
  rep(i, candidatePoints.size()) {
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j, vec.size()) {
      double tmp = distanceLP(vec[j], p);
      if (equals(dist, -1))
        dist = tmp;
      else if (!equals(dist, tmp)) {
        success = false;
      }
    }
    if (success)
      answer.push_back(p);
    if (answer.size() >= 2)
      break;
  }
  if (answer.size() == 1)
    printf("%.10f %.10f\n", answer[0].x, answer[0].y);
  else if (answer.empty())
    cout << NONE << endl;
  else
    cout << MANY << endl;
}
int main() {
  int n;
  while (cin >> n, n) {
    vector<Line> vec(n);
    rep(i, n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 90
memory_kb: 4288
final_rank: 15

code_snippet: #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define EPS (1e-5)
#define equals(a, b) (fabs((a) - (b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
using namespace std;
class Point {
public:
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) { return Point(x - p.x, y - p.y); }
  Point operator*(double a) { return Point(a * x, a * y); }
  Point operator/(double a) { return Point(x / a, y / a); }
  Point operator*(Point a) {
    return Point(x * a.x - y * a.y, x * a.y + y * a.x);
  }
  bool operator<(const Point &p) const {
    return !equals(x, p.x) ? x < p.x : (!equals(y, p.y) && y < p.y);
  }
  bool operator==(const Point &p) const {
    return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
  }
};
struct Segment {
  Point p1, p2;
  int index;
  Segment(Point p1 = Point(), Point p2 = Point(), int index = -1)
      : p1(p1), p2(p2), index(index) {}
  bool operator<(const Segment &s) const {
    return (p2 == s.p2) ? p1 < s.p1 : p2 < s.p2;
  }
  bool operator==(const Segment &s) const {
    return (s.p1 == p1 && s.p2 == p2) || (s.p1 == p2 && s.p2 == p1);
  }
};
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
double dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
double norm(Point a) { return a.x * a.x + a.y * a.y; }
double abs(Point a) { return sqrt(norm(a)); }
Point rotate(Point a, double rad) {
  return Point(cos(rad) * a.x - sin(rad) * a.y,
               sin(rad) * a.x + cos(rad) * a.y);
}
double toRad(double agl) { return agl * M_PI / 180.0; }
double getArg(Point a, Point b, Point c) {
  double arg1 = atan2(b.y - a.y, b.x - a.x);
  double arg2 = atan2(c.y - b.y, c.x - b.x);
  double arg = fabs(arg1 - arg2);
  while (arg > M_PI)
    arg -= 2.0 * M_PI;
  return fabs(arg);
}
int ccw(Point p0, Point p1, Point p2) {
  Point a = p1 - p0;
  Point b = p2 - p0;
  if (cross(a, b) > EPS)
    return COUNTER_CLOCKWISE;
  if (cross(a, b) < -EPS)
    return CLOCKWISE;
  if (dot(a, b) < -EPS)
    return ONLINE_BACK;
  if (norm(a) < norm(b))
    return ONLINE_FRONT;
  return ON_SEGMENT;
}
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2 - l.p1, m.p2 - m.p1)) > EPS ||
         abs(cross(l.p2 - l.p1, m.p1 - l.p1)) < EPS;
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2 - l.p1, s.p1 - l.p1) * cross(l.p2 - l.p1, s.p2 - l.p1) <
         EPS;
}
bool intersectLP(Line l, Point p) {
  return abs(cross(l.p2 - p, l.p1 - p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1, s.p2, t.p1) * ccw(s.p1, s.p2, t.p2) <= 0 &&
         ccw(t.p1, t.p2, s.p1) * ccw(t.p1, t.p2, s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1 - p) + abs(s.p2 - p) - abs(s.p2 - s.p1) < EPS;
}
Point projection(Line l, Point p) {
  double t = dot(p - l.p1, l.p1 - l.p2) / norm(l.p1 - l.p2);
  return l.p1 + (l.p1 - l.p2) * t;
}
Point reflection(Line l, Point p) { return p + (projection(l, p) - p) * 2; }
double distanceLP(Line l, Point p) { return abs(p - projection(l, p)); }
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s))
    return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r))
    return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t))
    return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
Point crosspoint(Line l, Line m) {
  double A = cross(l.p2 - l.p1, m.p2 - m.p1);
  double B = cross(l.p2 - l.p1, l.p2 - m.p1);
  if (abs(A) < EPS && abs(B) < EPS) {
    vector<Point> vec;
    vec.push_back(l.p1), vec.push_back(l.p2), vec.push_back(m.p1),
        vec.push_back(m.p2);
    sort(vec.begin(), vec.end());
    assert(vec[1] == vec[2]);
    return vec[1];
  }
  if (abs(A) < EPS)
    assert(false);
  return m.p1 + (m.p2 - m.p1) * (B / A);
}
double cross3p(Point p, Point q, Point r) {
  return (r.x - q.x) * (p.y - q.y) - (r.y - q.y) * (p.x - q.x);
}
bool collinear(Point p, Point q, Point r) {
  return fabs(cross3p(p, q, r)) < EPS;
}
bool ccwtest(Point p, Point q, Point r) { return cross3p(p, q, r) > 0; }
bool onSegment(Point p, Point q, Point r) {
  return collinear(p, q, r) &&
         equals(sqrt(pow(p.x - r.x, 2) + pow(p.y - r.y, 2)) +
                    sqrt(pow(r.x - q.x, 2) + pow(r.y - q.y, 2)),
                sqrt(pow(p.x - q.x, 2) + pow(p.y - q.y, 2)));
}
Line calcLine(Line line1, Line line2, Point p1, Point p2) {
  Point cp = crosspoint(line1, line2);
  int res = ccw(cp, p1, p2);
  Point base;
  if (res == COUNTER_CLOCKWISE)
    base = p1;
  else
    base = p2;
  Point not_base = (base == p1) ? p2 : p1;
  double arg_a = (toRad(180.0) - getArg(base, cp, not_base));
  Vector e = (base - cp) / abs(base - cp);
  e = rotate(e, arg_a / 2.0);
  Line tmp = Line(cp, cp + e * 100);
  return tmp;
}
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec) {
  if (vec.size() <= 2) {
    cout << MANY << endl;
    return;
  }
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i, n) REP(j, i + 1, n) {
    if (equals(cross(vec[i].p1 - vec[i].p2, vec[j].p1 - vec[j].p2), 0.0)) {
      Vector e = (vec[i].p2 - vec[i].p1) / abs(vec[i].p2 - vec[i].p1);
      e = rotate(e, toRad(90));
      Line line = Line(vec[i].p1, vec[i].p1 + e * 100);
      Point cp1 = crosspoint(line, vec[i]);
      Point cp2 = crosspoint(line, vec[j]);
      Point mp = (cp1 + cp2) / 2.0;
      e = (vec[i].p2 - vec[i].p1) / abs(vec[i].p2 - vec[i].p1);
      line = Line(mp, mp + e * 100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i], vec[j]);
      Point I = (vec[i].p1 == cp) ? vec[i].p2 : vec[i].p1;
      Point J = (vec[j].p1 == cp) ? vec[j].p2 : vec[j].p1;
      Vector e1 = (I - cp) / abs(I - cp);
      Vector e2 = (J - cp) / abs(J - cp);
      Line tmp = calcLine(vec[i], vec[j], cp + e1 * 100, cp + e2 * 100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i], vec[j], cp + e1 * 100, cp - e2 * 100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if (candidateLines.size() >= 10)
      break;
  }
  vector<Point> candidatePoints;
  rep(i, candidateLines.size()) REP(j, i + 1, candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if (equals(cross(line1.p1 - line1.p2, line2.p1 - line2.p2), 0.0))
      continue;
    Point cp = crosspoint(line1, line2);
    candidatePoints.push_back(cp);
  }
  vector<Point> &v = candidatePoints;
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  vector<Point> answer;
  rep(i, candidatePoints.size()) {
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j, vec.size()) {
      double tmp = distanceLP(vec[j], p);
      if (equals(dist, -1))
        dist = tmp;
      else if (!equals(dist, tmp)) {
        success = false;
      }
    }
    if (success)
      answer.push_back(p);
    if (answer.size() >= 2)
      break;
  }
  if (answer.size() == 1)
    printf("%.10f %.10f\n", answer[0].x, answer[0].y);
  else if (answer.empty())
    cout << NONE << endl;
  else
    cout << MANY << endl;
}
int main() {
  int n;
  while (cin >> n, n) {
    vector<Line> vec(n);
    rep(i, n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 90
memory_kb: 4192
final_rank: 14

code_snippet: #include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define EPS (1e-7)
#define equals(a, b) (fabs((a) - (b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
using namespace std;
class Point {
public:
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  Point operator+(Point p) { return Point(x + p.x, y + p.y); }
  Point operator-(Point p) { return Point(x - p.x, y - p.y); }
  Point operator*(double a) { return Point(a * x, a * y); }
  Point operator/(double a) { return Point(x / a, y / a); }
  Point operator*(Point a) {
    return Point(x * a.x - y * a.y, x * a.y + y * a.x);
  }
  bool operator<(const Point &p) const {
    return !equals(x, p.x) ? x < p.x : (!equals(y, p.y) && y < p.y);
  }
  bool operator==(const Point &p) const {
    return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
  }
};
struct Segment {
  Point p1, p2;
  int index;
  Segment(Point p1 = Point(), Point p2 = Point(), int index = -1)
      : p1(p1), p2(p2), index(index) {}
  bool operator<(const Segment &s) const {
    return (p2 == s.p2) ? p1 < s.p1 : p2 < s.p2;
  }
  bool operator==(const Segment &s) const {
    return (s.p1 == p1 && s.p2 == p2) || (s.p1 == p2 && s.p2 == p1);
  }
};
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
double dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
double norm(Point a) { return a.x * a.x + a.y * a.y; }
double abs(Point a) { return sqrt(norm(a)); }
Point rotate(Point a, double rad) {
  return Point(cos(rad) * a.x - sin(rad) * a.y,
               sin(rad) * a.x + cos(rad) * a.y);
}
double toRad(double agl) { return agl * M_PI / 180.0; }
double getArg(Point a, Point b, Point c) {
  double arg1 = atan2(b.y - a.y, b.x - a.x);
  double arg2 = atan2(c.y - b.y, c.x - b.x);
  double arg = fabs(arg1 - arg2);
  while (arg > M_PI)
    arg -= 2.0 * M_PI;
  return fabs(arg);
}
int ccw(Point p0, Point p1, Point p2) {
  Point a = p1 - p0;
  Point b = p2 - p0;
  if (cross(a, b) > EPS)
    return COUNTER_CLOCKWISE;
  if (cross(a, b) < -EPS)
    return CLOCKWISE;
  if (dot(a, b) < -EPS)
    return ONLINE_BACK;
  if (norm(a) < norm(b))
    return ONLINE_FRONT;
  return ON_SEGMENT;
}
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2 - l.p1, m.p2 - m.p1)) > EPS ||
         abs(cross(l.p2 - l.p1, m.p1 - l.p1)) < EPS;
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2 - l.p1, s.p1 - l.p1) * cross(l.p2 - l.p1, s.p2 - l.p1) <
         EPS;
}
bool intersectLP(Line l, Point p) {
  return abs(cross(l.p2 - p, l.p1 - p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1, s.p2, t.p1) * ccw(s.p1, s.p2, t.p2) <= 0 &&
         ccw(t.p1, t.p2, s.p1) * ccw(t.p1, t.p2, s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1 - p) + abs(s.p2 - p) - abs(s.p2 - s.p1) < EPS;
}
Point projection(Line l, Point p) {
  double t = dot(p - l.p1, l.p1 - l.p2) / norm(l.p1 - l.p2);
  return l.p1 + (l.p1 - l.p2) * t;
}
Point reflection(Line l, Point p) { return p + (projection(l, p) - p) * 2; }
double distanceLP(Line l, Point p) { return abs(p - projection(l, p)); }
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s))
    return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r))
    return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t))
    return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
Point crosspoint(Line l, Line m) {
  double A = cross(l.p2 - l.p1, m.p2 - m.p1);
  double B = cross(l.p2 - l.p1, l.p2 - m.p1);
  if (abs(A) < EPS && abs(B) < EPS) {
    vector<Point> vec;
    vec.push_back(l.p1), vec.push_back(l.p2), vec.push_back(m.p1),
        vec.push_back(m.p2);
    sort(vec.begin(), vec.end());
    assert(vec[1] == vec[2]);
    return vec[1];
  }
  if (abs(A) < EPS)
    assert(false);
  return m.p1 + (m.p2 - m.p1) * (B / A);
}
double cross3p(Point p, Point q, Point r) {
  return (r.x - q.x) * (p.y - q.y) - (r.y - q.y) * (p.x - q.x);
}
bool collinear(Point p, Point q, Point r) {
  return fabs(cross3p(p, q, r)) < EPS;
}
bool ccwtest(Point p, Point q, Point r) { return cross3p(p, q, r) > 0; }
bool onSegment(Point p, Point q, Point r) {
  return collinear(p, q, r) &&
         equals(sqrt(pow(p.x - r.x, 2) + pow(p.y - r.y, 2)) +
                    sqrt(pow(r.x - q.x, 2) + pow(r.y - q.y, 2)),
                sqrt(pow(p.x - q.x, 2) + pow(p.y - q.y, 2)));
}
Line calcLine(Line line1, Line line2, Point p1, Point p2) {
  Point cp = crosspoint(line1, line2);
  int res = ccw(cp, p1, p2);
  Point base;
  if (res == COUNTER_CLOCKWISE)
    base = p1;
  else
    base = p2;
  Point not_base = (base == p1) ? p2 : p1;
  double arg_a = (toRad(180.0) - getArg(base, cp, not_base));
  Vector e = (base - cp) / abs(base - cp);
  e = rotate(e, arg_a / 2.0);
  Line tmp = Line(cp, cp + e * 100);
  return tmp;
}
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec) {
  if (vec.size() <= 2) {
    cout << MANY << endl;
    return;
  }
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i, n) REP(j, i + 1, n) {
    if (equals(cross(vec[i].p1 - vec[i].p2, vec[j].p1 - vec[j].p2), 0.0)) {
      Vector e = (vec[i].p2 - vec[i].p1) / abs(vec[i].p2 - vec[i].p1);
      e = rotate(e, toRad(90));
      Line line = Line(vec[i].p1, vec[i].p1 + e * 100);
      Point cp1 = crosspoint(line, vec[i]);
      Point cp2 = crosspoint(line, vec[j]);
      Point mp = (cp1 + cp2) / 2.0;
      e = (vec[i].p2 - vec[i].p1) / abs(vec[i].p2 - vec[i].p1);
      line = Line(mp, mp + e * 100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i], vec[j]);
      Point I = (vec[i].p1 == cp) ? vec[i].p2 : vec[i].p1;
      Point J = (vec[j].p1 == cp) ? vec[j].p2 : vec[j].p1;
      Vector e1 = (I - cp) / abs(I - cp);
      Vector e2 = (J - cp) / abs(J - cp);
      Line tmp = calcLine(vec[i], vec[j], cp + e1 * 100, cp + e2 * 100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i], vec[j], cp + e1 * 100, cp - e2 * 100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if (candidateLines.size() >= 10)
      break;
  }
  vector<Point> candidatePoints;
  rep(i, candidateLines.size()) REP(j, i + 1, candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if (equals(cross(line1.p1 - line1.p2, line2.p1 - line2.p2), 0.0))
      continue;
    Point cp = crosspoint(line1, line2);
    candidatePoints.push_back(cp);
  }
  vector<Point> &v = candidatePoints;
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  vector<Point> answer;
  rep(i, candidatePoints.size()) {
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j, vec.size()) {
      double tmp = distanceLP(vec[j], p);
      if (equals(dist, -1))
        dist = tmp;
      else if (!equals(dist, tmp)) {
        success = false;
      }
    }
    if (success)
      answer.push_back(p);
    if (answer.size() >= 2)
      break;
  }
  if (answer.size() == 1)
    printf("%.10f %.10f\n", answer[0].x, answer[0].y);
  else if (answer.empty())
    cout << NONE << endl;
  else
    cout << MANY << endl;
}
int main() {
  int n;
  while (cin >> n, n) {
    vector<Line> vec(n);
    rep(i, n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 90
memory_kb: 4300
final_rank: 16

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, t) for (int i = (int)(s); i < (int)(t); ++i)
#define revrep(i, t, s) for (int i = (int)(t)-1; i >= (int)(s); --i)
#define all(x) begin(x), end(x)
template <typename T> bool chmax(T& a, const T& b) { return a < b ? (a = b, 1) : 0; }
template <typename T> bool chmin(T& a, const T& b) { return a > b ? (a = b, 1) : 0; }

using T = double;
using Vec = std::complex<T>;

const T PI = std::acos(-1);

constexpr T eps = 1e-6;
inline bool eq(T a, T b) { return std::abs(a - b) < eps; }
inline bool eq(Vec a, Vec b) { return std::abs(a - b) < eps; }
inline bool lt(T a, T b) { return a < b - eps; }
inline bool leq(T a, T b) { return a < b + eps; }

std::istream& operator>>(std::istream& is, Vec& p) {
    T x, y;
    is >> x >> y;
    p = {x, y};
    return is;
}

struct Line {
    Vec p1, p2;
    Line() = default;
    Line(const Vec& p1, const Vec& p2) : p1(p1), p2(p2) {}
    Vec dir() const { return p2 - p1; }
};

struct Segment {
    Vec p1, p2;
    Segment() = default;
    Segment(const Vec& p1, const Vec& p2) : p1(p1), p2(p2) {}
    Vec dir() const { return p2 - p1; }
};

struct Circle {
    Vec c;
    T r;
    Circle() = default;
    Circle(const Vec& c, T r) : c(c), r(r) {}
};

using Polygon = std::vector<Vec>;

T dot(const Vec& a, const Vec& b) {
    return (std::conj(a) * b).real();
}

T cross(const Vec& a, const Vec& b) {
    return (std::conj(a) * b).imag();
}

Vec rot(const Vec& a, T ang) {
    return a * Vec(std::cos(ang), std::sin(ang));
}

Vec perp(const Vec& a) {
    return Vec(-a.imag(), a.real());
}

Vec projection(const Line& l, const Vec& p) {
    return l.p1 + dot(p - l.p1, l.dir()) * l.dir() / std::norm(l.dir());
}

Vec reflection(const Line& l, const Vec& p) {
    return T(2) * projection(l, p) - p;
}

// 0: collinear
// 1: counter-clockwise
// 2: clockwise
int ccw(const Vec& a, const Vec& b, const Vec& c) {
    if (eq(cross(b - a, c - a), 0)) return 0;
    if (lt(cross(b - a, c - a), 0)) return -1;
    return 1;
}

T dist(const Line& l, const Vec& p) {
    return std::abs(cross(p - l.p1, l.dir())) / std::abs(l.dir());
}


Line bisector(const Segment& s) {
    auto m = (s.p1 + s.p2) / T(2);
    return Line(m, m + perp(s.dir()));
}

Vec intersection(const Line& l, const Line& m) {
    Vec r = m.p1 - l.p1;
    assert(!eq(cross(l.dir(), m.dir()), 0)); // not parallel
    return l.p1 + cross(m.dir(), r) / cross(m.dir(), l.dir()) * l.dir();
}


std::pair<Line, Line> bisector(const Line& l, const Line& m) {
    // parallel
    if (eq(cross(l.dir(), m.dir()), 0)) {
        auto n = Line(l.p1, l.p1 + perp(l.dir()));
        auto p = intersection(n, m);
        auto m = (l.p1 + p) / T(2);
        return {Line(m, m + l.dir()), Line()};
    }
    auto p = intersection(l, m);
    T ang = (std::arg(l.dir()) + std::arg(m.dir())) / T(2);
    auto b1 = Line(p, p + std::polar(T(1), ang));
    auto b2 = Line(p, p + std::polar(T(1), ang + PI / T(2)));
    return {b1, b2};
}

void sort_by_arg(std::vector<Vec>& pts) {
    std::sort(pts.begin(), pts.end(), [&](auto& p, auto& q) {
        if ((p.imag() < 0) != (q.imag() < 0)) return (p.imag() < 0);
        if (cross(p, q) == 0) {
            if (p == Vec(0, 0)) return !(q.imag() < 0 || (q.imag() == 0 && q.real() > 0));
            if (q == Vec(0, 0)) return  (p.imag() < 0 || (p.imag() == 0 && p.real() > 0));
            return (p.real() > q.real());
        }
        return (cross(p, q) > 0);
    });
}

template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
    for (int i = 0; i < (int) v.size(); ++i) os << v[i] << " ";
    return os;
}
ostream& operator<<(ostream& os, const Line& l) {
    os << "(" << l.p1 << ", " << l.p2 << ")";
    return os;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);

    while (true) {
        int n;
        cin >> n;
        if (n == 0) break;
        vector<Line> lines;
        rep(i,0,n) {
            Line l;
            cin >> l.p1 >> l.p2;
            bool ok = true;
            rep(j,0,lines.size()) {
                // same line
                if (eq(cross(lines[j].dir(), l.dir()), 0) && eq(cross(lines[j].dir(), l.p1 - lines[j].p1), 0)) {
                    ok = false;
                    break;
                }
            }
            if (ok) lines.push_back(l);
        }
        if (lines.size() <= 2) {
            cout << "Many\n";
            continue;
        }
        vector<Vec> cand;
        rep(j,1,n) rep(k,j+1,n) {
            auto [b11, b12] = bisector(lines[0], lines[j]);
            auto [b21, b22] = bisector(lines[0], lines[k]);
            if (!eq(cross(b11.dir(), b21.dir()), 0)) cand.push_back(intersection(b11, b21));
            if (!eq(cross(b11.dir(), b22.dir()), 0)) cand.push_back(intersection(b11, b22));
            if (!eq(cross(b12.dir(), b21.dir()), 0)) cand.push_back(intersection(b12, b21));
            if (!eq(cross(b12.dir(), b22.dir()), 0)) cand.push_back(intersection(b12, b22));
        }
        vector<Vec> ans;
        for (auto& p : cand) {
            bool ok = true;
            rep(i,1,n) {
                if (!eq(dist(lines[0], p), dist(lines[i], p))) {
                    ok = false;
                    break;
                }
            }
            if (ok && (ans.empty() || !eq(ans[0], p))) {
                ans.push_back(p);
            }
        }
        if (ans.empty()) cout << "None\n";
        else if (ans.size() == 1) cout << ans[0].real() << " " << ans[0].imag() << "\n";
        else cout << "Many\n";
    }
}
accuracy: 1
time_ms: 40
memory_kb: 4608
final_rank: 18

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, t) for (int i = (int)(s); i < (int)(t); ++i)
#define revrep(i, t, s) for (int i = (int)(t)-1; i >= (int)(s); --i)
#define all(x) begin(x), end(x)
template <typename T> bool chmax(T& a, const T& b) { return a < b ? (a = b, 1) : 0; }
template <typename T> bool chmin(T& a, const T& b) { return a > b ? (a = b, 1) : 0; }

using T = double;
using Vec = std::complex<T>;

const T PI = std::acos(-1);

constexpr T eps = 1e-6;
inline bool eq(T a, T b) { return std::abs(a - b) < eps; }
inline bool eq(Vec a, Vec b) { return std::abs(a - b) < eps; }
inline bool lt(T a, T b) { return a < b - eps; }
inline bool leq(T a, T b) { return a < b + eps; }

std::istream& operator>>(std::istream& is, Vec& p) {
    T x, y;
    is >> x >> y;
    p = {x, y};
    return is;
}

struct Line {
    Vec p1, p2;
    Line() = default;
    Line(const Vec& p1, const Vec& p2) : p1(p1), p2(p2) {}
    Vec dir() const { return p2 - p1; }
};

struct Segment {
    Vec p1, p2;
    Segment() = default;
    Segment(const Vec& p1, const Vec& p2) : p1(p1), p2(p2) {}
    Vec dir() const { return p2 - p1; }
};

struct Circle {
    Vec c;
    T r;
    Circle() = default;
    Circle(const Vec& c, T r) : c(c), r(r) {}
};

using Polygon = std::vector<Vec>;

T dot(const Vec& a, const Vec& b) {
    return (std::conj(a) * b).real();
}

T cross(const Vec& a, const Vec& b) {
    return (std::conj(a) * b).imag();
}

Vec rot(const Vec& a, T ang) {
    return a * Vec(std::cos(ang), std::sin(ang));
}

Vec perp(const Vec& a) {
    return Vec(-a.imag(), a.real());
}

Vec projection(const Line& l, const Vec& p) {
    return l.p1 + dot(p - l.p1, l.dir()) * l.dir() / std::norm(l.dir());
}

Vec reflection(const Line& l, const Vec& p) {
    return T(2) * projection(l, p) - p;
}

// 0: collinear
// 1: counter-clockwise
// 2: clockwise
int ccw(const Vec& a, const Vec& b, const Vec& c) {
    if (eq(cross(b - a, c - a), 0)) return 0;
    if (lt(cross(b - a, c - a), 0)) return -1;
    return 1;
}

T dist(const Line& l, const Vec& p) {
    return std::abs(cross(p - l.p1, l.dir())) / std::abs(l.dir());
}


Line bisector(const Segment& s) {
    auto m = (s.p1 + s.p2) / T(2);
    return Line(m, m + perp(s.dir()));
}

Vec intersection(const Line& l, const Line& m) {
    Vec r = m.p1 - l.p1;
    assert(!eq(cross(l.dir(), m.dir()), 0)); // not parallel
    return l.p1 + cross(m.dir(), r) / cross(m.dir(), l.dir()) * l.dir();
}


std::pair<Line, Line> bisector(const Line& l, const Line& m) {
    auto p = intersection(l, m);
    T ang = (std::arg(l.dir()) + std::arg(m.dir())) / T(2);
    auto b1 = Line(p, p + std::polar(T(1), ang));
    auto b2 = Line(p, p + std::polar(T(1), ang + PI / T(2)));
    return {b1, b2};
}

void sort_by_arg(std::vector<Vec>& pts) {
    std::sort(pts.begin(), pts.end(), [&](auto& p, auto& q) {
        if ((p.imag() < 0) != (q.imag() < 0)) return (p.imag() < 0);
        if (cross(p, q) == 0) {
            if (p == Vec(0, 0)) return !(q.imag() < 0 || (q.imag() == 0 && q.real() > 0));
            if (q == Vec(0, 0)) return  (p.imag() < 0 || (p.imag() == 0 && p.real() > 0));
            return (p.real() > q.real());
        }
        return (cross(p, q) > 0);
    });
}

template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
    for (int i = 0; i < (int) v.size(); ++i) os << v[i] << " ";
    return os;
}
ostream& operator<<(ostream& os, const Line& l) {
    os << "(" << l.p1 << ", " << l.p2 << ")";
    return os;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);

    while (true) {
        int n;
        cin >> n;
        if (n == 0) break;
        vector<Line> lines;
        rep(i,0,n) {
            Line l;
            cin >> l.p1 >> l.p2;
            bool ok = true;
            rep(j,0,lines.size()) {
                // same line
                if (eq(cross(lines[j].dir(), l.dir()), 0) && eq(cross(lines[j].dir(), l.p1 - lines[j].p1), 0)) {
                    ok = false;
                    break;
                }
            }
            if (ok) lines.push_back(l);
        }
        if (lines.size() <= 2) {
            cout << "Many\n";
            continue;
        }
        vector<Vec> cand;
        rep(j,1,n) rep(k,j+1,n) {
            Line b11, b12, b21, b22;
            if (!eq(cross(lines[0].dir(), lines[j].dir()), 0)) {
                tie(b11, b12) = bisector(lines[0], lines[j]);
            } else {
                auto l = Line(Vec(0, 0), perp(lines[0].dir()));
                auto p1 = intersection(lines[0], l);
                auto p2 = intersection(lines[j], l);
                auto m = (p1 + p2) / 2.0;
                b11 = Line(m, m + lines[0].dir());
            }
            if (!eq(cross(lines[0].dir(), lines[k].dir()), 0)) {
                tie(b21, b22) = bisector(lines[0], lines[k]);
            } else {
                auto l = Line(Vec(0, 0), perp(lines[0].dir()));
                auto p1 = intersection(lines[0], l);
                auto p2 = intersection(lines[k], l);
                auto m = (p1 + p2) / 2.0;
                b21 = Line(m, m + lines[0].dir());
            }
            if (!eq(cross(b11.dir(), b21.dir()), 0)) cand.push_back(intersection(b11, b21));
            if (!eq(cross(b11.dir(), b22.dir()), 0)) cand.push_back(intersection(b11, b22));
            if (!eq(cross(b12.dir(), b21.dir()), 0)) cand.push_back(intersection(b12, b21));
            if (!eq(cross(b12.dir(), b22.dir()), 0)) cand.push_back(intersection(b12, b22));
        }
        vector<Vec> ans;
        for (auto& p : cand) {
            bool ok = true;
            rep(i,1,n) {
                if (!eq(dist(lines[0], p), dist(lines[i], p))) {
                    ok = false;
                    break;
                }
            }
            if (ok && (ans.empty() || !eq(ans[0], p))) {
                ans.push_back(p);
            }
        }
        if (ans.empty()) cout << "None\n";
        else if (ans.size() == 1) cout << ans[0].real() << " " << ans[0].imag() << "\n";
        else cout << "Many\n";
    }
}
accuracy: 1
time_ms: 40
memory_kb: 4452
final_rank: 17

code_snippet: #include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long MOD = 1000000007;
//constexpr long long MOD = 998244353;
constexpr double EPS = 1e-6;

//int N, M, K, T, H, W, L, R;
long long int N, M, K, T, H, W, L, R;

struct  Point {
	long double x;
	long double y;
	Point(long double xx, long double yy) {
		x = xx, y = yy;
	}
	Point() {

	}
	void Input() {
		cin >> x >> y;
	}
	Point operator + (const Point& c)const {
		Point box;
		box.x = x + c.x;
		box.y = y + c.y;
		return box;
	}
	Point operator - (const Point& c)const {
		Point box;
		box.x = x - c.x;
		box.y = y - c.y;
		return box;
	}
	Point operator * (const long double& b)const {
		Point box;
		box.x = x * b;
		box.y = y * b;
		return box;
	}
	bool operator <(const Point& c)const {
		if (y < c.y)return true;
		if (y > c.y)return false;
		if (x < c.x)return true;
		return false;
	}
	bool operator >(const Point& c)const {
		if (y > c.y)return true;
		if (y < c.y)return false;
		if (x > c.x)return true;
		return false;
	}
	bool operator ==(const Point& c)const {
		return abs(x - c.x) <= EPS && abs(y - c.y) <= EPS;
	}
	long double det(Point a) {
		return x * a.y - y * a.x;
	}
};

struct Line {
	long double a, b, c;
	Line(const int aa, const int bb, const int cc) {
		a = aa, b = bb, c = cc;
	}
	Line(const Point s, const Point t) {
		if (abs(s.x - t.x) < EPS) {
			a = 1;
			b = 0;
		}
		else {
			b = 1;
			a = (t.y - s.y) / (s.x - t.x);
		}
		c = s.x * a + s.y * b;
	}
};

long double dot(Point a, Point b) {
	return a.x * b.x + a.y * b.y;
}

long double cross(Point a, Point b) {
	return a.x * b.y - b.x * a.y;
}

long double Distance(Point a, Point b) {
	return sqrtl((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}

long double Distance(Point a, pair<Point, Point>b) {
	Line l = Line(b.first, b.second);
	if (abs(l.a * a.x + l.b * a.y - l.c) < EPS) {
		if (abs(Distance(a, b.first) + Distance(a, b.second) - Distance(b.second, b.first)) <= sqrtl(EPS))return 0;
		return min(Distance(a, b.first), Distance(a, b.second));
	}
	long double A = powl((b.first.x - b.second.x), 2) + powl((b.first.y - b.second.y), 2);
	long double B = 2 * (a.x - b.first.x) * (b.first.x - b.second.x) + 2 * (a.y - b.first.y) * (b.first.y - b.second.y);
	long double r = B / 2 / A;
	r = -r;
	if (r >= 0 && r <= 1) {
		return Distance(a, Point(b.first.x + r * (b.second.x - b.first.x), b.first.y + r * (b.second.y - b.first.y)));
	}
	else {
		return min(Distance(a, b.first), Distance(a, b.second));
	}
}

bool LineCross(Point a1, Point a2, Point b1, Point b2) {
	return cross(a2 - a1, b1 - a1) * cross(a2 - a1, b2 - a1) < EPS && cross(b2 - b1, a1 - b1) * cross(b2 - b1, a2 - b1) < EPS && !(abs((a1 - a2).x * (a1 - b1).y - (a1 - a2).y * (a1 - b1).x) < EPS && abs((a1 - a2).x * (a1 - b2).y - (a1 - a2).y * (a1 - b2).x) < EPS && abs(Distance(a1, a2) - Distance(a1, b1) - Distance(a2, b1)) > EPS && abs(Distance(a1, a2) - Distance(a2, b2) - Distance(a1, b2)) > EPS && abs(Distance(b1, b2) - Distance(a1, b1) - Distance(a1, b2)) > EPS && abs(Distance(b1, b2) - Distance(a2, b1) - Distance(a2, b2)) > EPS);
}

long double Distance(pair<Point, Point>a, pair<Point, Point>b) {
	if (LineCross(a.first, a.second, b.first, b.second))return 0;
	return min({ Distance(a.first,b),Distance(a.second,b),Distance(b.first,a),Distance(b.second,a) });
}

Point LineCross(Line a, Line b) {
	Point ret;
	ret.x = (a.c * b.b - a.b * b.c) / (a.a * b.b - a.b * b.a);
	ret.y = -(a.c * b.a - a.a * b.c) / (a.a * b.b - a.b * b.a);
	return ret;
}

long double TriangleArea(Point a, Point b, Point c) {
	long double A, B, C;
	A = Distance(a, b);
	B = Distance(a, c);
	C = Distance(b, c);
	long double S = (A + B + C) / 2;
	return sqrtl(S * (S - A) * (S - B) * (S - C));
}

bool IsPointLeft(pair<Point, Point>a, Point b) {
	a.second = a.second - a.first;
	b = b - a.first;
	a.first = a.first - a.first;
	long double radline = atan2l(a.second.y, a.second.x);
	long double radpoint = atan2l(b.y, b.x) - radline;
	if (sinl(radpoint) >= -EPS)return true;
	else return false;
}

bool IsPointInPolygon(Point p, vector<Point>poly) {
	bool ret = true;
	for (int i = 0; i < poly.size(); i++) {
		if (Distance(p, { poly[i],poly[(i + 1) % poly.size()] }) <= EPS) return true;
		ret &= IsPointLeft({ poly[i],poly[(i + 1) % poly.size()] }, p);
	}
	return ret;
}

long double Area(vector<Point>p) {
	long double ret = 0;
	for (int i = 2; i < p.size(); i++) {
		ret += TriangleArea(p[0], p[i - 1], p[i]);
	}
	return ret;
}

vector<vector<Point>>DividePolygonByLine(vector<Point>p, pair<Point, Point>l) {
	vector<int>cr;
	vector<Point>cp;
	for (int k = 0; k < p.size(); k++) {
		int nx = k + 1;
		nx %= p.size();
		if (LineCross(p[k], p[(k + 1) % p.size()], l.first, l.second)) {
			auto np = LineCross(Line(p[k], p[(k + 1) % p.size()]), Line(l.first, l.second));
			bool flag = true;
			for (auto l : cp) {
				if (Distance(l, np) <= EPS)flag = false;
			}
			if (flag) {
				cr.push_back(k);
				cp.push_back(np);
			}
		}
	}
	vector<Point>w;
	vector<Point>x;
	if (cr.size() != 2)return vector<vector<Point>>(1, p);
	int cnt = cr[0];
	do {
		if (w.empty() || Distance(w.back(), p[cnt]) > EPS)w.push_back(p[cnt]);
		if (cnt == cr[0]) {
			if (w.empty() || Distance(w.back(), cp[0]) > EPS)w.push_back(cp[0]);
			if (w.empty() || Distance(w.back(), cp[1]) > EPS)w.push_back(cp[1]);
			cnt = cr[1] + 1;
			cnt %= p.size();
		}
		else if (cnt == cr[1]) {
			if (w.empty() || Distance(w.back(), cp[1]) > EPS)w.push_back(cp[1]);
			if (w.empty() || Distance(w.back(), cp[0]) > EPS)w.push_back(cp[0]);
			cnt = cr[0] + 1;
			cnt %= p.size();
		}
		else {
			cnt++;
			cnt %= p.size();
		}
	} while (cnt != cr[0]);
	cnt = cr[1];
	do {
		if (x.empty() || Distance(x.back(), p[cnt]) > EPS)x.push_back(p[cnt]);
		if (cnt == cr[0]) {
			if (x.empty() || Distance(x.back(), cp[0]) > EPS)x.push_back(cp[0]);
			if (x.empty() || Distance(x.back(), cp[1]) > EPS)x.push_back(cp[1]);
			cnt = cr[1] + 1;
			cnt %= p.size();
		}
		else if (cnt == cr[1]) {
			if (x.empty() || Distance(x.back(), cp[1]) > EPS)x.push_back(cp[1]);
			if (x.empty() || Distance(x.back(), cp[0]) > EPS)x.push_back(cp[0]);
			cnt = cr[0] + 1;
			cnt %= p.size();
		}
		else {
			cnt++;
			cnt %= p.size();
		}
	} while (cnt != cr[1]);
	vector<vector<Point>>ret;
	ret.push_back(w);
	ret.push_back(x);
	return ret;
}

struct Circle {
	Point p;
	long double r;
	void Input() {
		p.Input();
		cin >> r;
	}
	bool operator==(const Circle& c)const {
		return p.x == c.p.x && p.y == c.p.y && r == c.r;
	}
};

Circle FindCircle(Point a, Point b, Point c) {
	Circle ret;
	ret.p.x = 0, ret.p.y = 0, ret.r = -1;
	if (a == b)return ret;
	if (a == c)return ret;
	if (c == b)return ret;
	auto ac = c - a;
	auto ab = b - a;
	if ((ac.y * ab.x - ab.y * ac.x) <= EPS)return ret;
	swap(ab.x, ab.y);
	ab.x *= -1;
	swap(ac.x, ac.y);
	ac.x *= -1;
	auto p = LineCross(Line((a + b) * 0.5, (a + b) * 0.5 + ab), Line((a + c) * 0.5, (a + c) * 0.5 + ac));
	ret.p.x = p.x, ret.p.y = p.y;
	ret.r = Distance(p, a);
	return ret;
}

vector<Point>CircleCross(Circle a, Circle b) {
	vector<Point>ret;
	Point ap(a.p.x, a.p.y);
	Point bp(b.p.x, b.p.y);
	Point dp = bp - ap;
	auto dis = Distance(ap, bp);
	if (a == b)return ret;
	if (a.r + b.r < Distance(ap, bp))return ret;
	if (abs(a.r + b.r - dis) <= EPS) {
		ret.push_back(ap + dp * (a.r / (a.r + b.r)));
		return ret;
	}
	if (abs(abs(a.r - b.r) - dis) <= EPS) {
		ret.push_back(ap + dp * (a.r / (a.r - b.r)));
	}
	long double ad;
	ad = (a.r * a.r - b.r * b.r + dis * dis) / 2 / dis;
	Point cp = ap + dp * (ad / dis);
	long double amari = sqrtl(a.r * a.r - ad * ad);
	ret.push_back(cp + Point(-dp.y, dp.x) * (amari / dis));
	ret.push_back(cp - Point(-dp.y, dp.x) * (amari / dis));
	return ret;
}

vector<pair<Point, Point>>Common_Tangent(Circle a, Circle b, long double inf) {
	long double pi = acosl(-1);
	Point ap = Point(a.p.x, a.p.y);
	Point bp = Point(b.p.x, b.p.y);
	Point dp = bp - ap;
	vector<pair<Point, Point>>ret;
	long double rad = atan2l(dp.y, dp.x);
	long double d = hypotl(dp.y, dp.x);
	if (a.r + b.r <= d) {
		long double newrad = asinl((a.r + b.r) / d);
		{
			long double fd = hypotl(inf, a.r);
			long double lrad = atan2l(a.r, -inf);
			long double rrad = atan2l(a.r, inf);
			pair<Point, Point>l = { Point(fd * cosl(lrad + rad - newrad),fd * sinl(lrad + rad - newrad)),Point(fd * cosl(rrad + rad - newrad),fd * sinl(rrad + rad - newrad)) };
			ret.push_back({ l.first + ap,l.second + ap });
		}
		newrad *= -1;
		{
			long double fd = hypotl(inf, -a.r);
			long double lrad = atan2l(-a.r, -inf);
			long double rrad = atan2l(-a.r, inf);
			pair<Point, Point>l = { Point(fd * cosl(lrad + rad - newrad),fd * sinl(lrad + rad - newrad)),Point(fd * cosl(rrad + rad - newrad),fd * sinl(rrad + rad - newrad)) };
			ret.push_back({ l.first + ap,l.second + ap });
		}
	}
	if (abs(a.r - b.r) <= d) {
		long double newrad = asinl(abs(a.r - b.r) / d);
		{
			long double fd = hypotl(inf, a.r);
			long double lrad = atan2l(a.r, -inf);
			long double rrad = atan2l(a.r, inf);
			pair<Point, Point>l = { Point(fd * cosl(lrad + rad - newrad),fd * sinl(lrad + rad - newrad)),Point(fd * cosl(rrad + rad - newrad),fd * sinl(rrad + rad - newrad)) };
			ret.push_back({ l.first + ap,l.second + ap });
		}
		newrad *= -1;
		{
			long double fd = hypot(inf, -a.r);
			long double lrad = atan2(-a.r, -inf);
			long double rrad = atan2(-a.r, inf);
			pair<Point, Point>l = { Point(fd * cosl(lrad + rad - newrad),fd * sinl(lrad + rad - newrad)),Point(fd * cosl(rrad + rad - newrad),fd * sinl(rrad + rad - newrad)) };
			ret.push_back({ l.first + ap,l.second + ap });
		}
	}
	return ret;
}

struct Convex_hull {
	vector<Point>node;
	vector<Point>ret;
	bool line;
	Convex_hull(bool l) {
		line = l;
	}
	void Add_node(Point n) {
		node.push_back(n);
	}
	vector<Point>solve() {
		sort(node.begin(), node.end());
		int index = 0;
		int num = node.size();
		ret.resize(num * 2);
		for (int i = 0; i < num; i++) {
			if (line) {
				while (index > 1 && (ret[index - 1] - ret[index - 2]).det(node[i] - ret[index - 1]) < -EPS) {
					index--;
				}
			}
			else {
				while (index > 1 && (ret[index - 1] - ret[index - 2]).det(node[i] - ret[index - 1]) < EPS) {
					index--;
				}
			}
			ret[index++] = node[i];
		}
		int box = index;
		for (int i = num - 2; i >= 0; i--) {
			if (line) {
				while (index > box && (ret[index - 1] - ret[index - 2]).det(node[i] - ret[index - 1]) < -EPS) {
					index--;
				}
			}
			else {
				while (index > box && (ret[index - 1] - ret[index - 2]).det(node[i] - ret[index - 1]) < EPS) {
					index--;
				}
			}
			ret[index++] = node[i];
		}
		ret.resize(index - 1);
		return ret;
	}
};

long double rad(Point a, Point b) {
	return atan2l(b.y - a.y, b.x - a.x);
}

long double rad(Point a, Point b, Point c) {
	if (Distance(a, b) > 0.1) {
		return rad(a, b);
	}
	else {
		return rad(a, c);
	}
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N;
	while (N) {
		vector<Line>l;
		vector<Point>a(N);
		vector<Point>b(N);
		for (int i = 0; i < N; i++) {
			a[i].Input();
			b[i].Input();
			l.push_back({ a[i],b[i] });
			auto q = b[i] - a[i];
			b[i] = a[i] + q * 20000;
			q = a[i] - b[i];
			a[i] = b[i] + q * 2;
		}
		if (N <= 2) {
			cout << "Many\n";
			cin >> N;
			continue;
		}
		vector<Point>v;
		vector<Point>w;
		for (int i = 0; i < N; i++) {
			for (int j = i + 1; j < N; j++) {
				if (abs((b[i] - a[i]).y * (b[j] - a[j]).x - (b[i] - a[i]).x * (b[j] - a[j]).y) > EPS) {
					auto p = LineCross(Line(a[i], b[i]), Line(a[j], b[j]));
					long double c, d;
					c = rad(p, a[i], b[i]);
					d = rad(p, a[j], b[j]);
					c = (c + d) / 2;
					d = c + acosl(-1) / 2;
					Point q, r;
					r = q = p;
					q.y += sinl(c);
					q.x += cosl(c);
					r.y += sinl(d);
					r.x += cosl(d);
					v.push_back(p);
					w.push_back(q);
					v.push_back(p);
					w.push_back(r);
				}
				else {
					v.push_back((a[i] + a[j]) * 0.5);
					w.push_back((a[i] + b[j]) * 0.5);
				}
			}
			if (w.size() > 10)break;
		}
		vector<Point>ans;
//		for (int i = 0; i < w.size(); i++) {
//			cout << i << "-----" << v[i].x << " " << v[i].y << " " << w[i].x << " " << w[i].y << endl;
//		}
		for (int i = 0; i < w.size(); i++) {
			for (int j = i + 1; j < w.size(); j++) {
				if (abs((w[i] - v[i]).y * (w[j] - v[j]).x - (w[i] - v[i]).x * (w[j] - v[j]).y) <= EPS)continue;
				auto p = LineCross(Line(v[i], w[i]), Line(v[j], w[j]));
				long double r = -1;
				ans.push_back(p);
			//	cout << p.x << " cand " << p.y << endl;
				for (int k = 0; k < N; k++) {
					auto box = Distance(p, { a[k], b[k] });
			//		cout <<fixed<<setprecision(20)<< box << endl;
					if (r < -0.1) {
						r = box;
					}
					else {
						if (abs(r - box) >= EPS) {
							ans.pop_back();
							break;
						}
					}
				}
				for (int l = 0; l + 1 < ans.size(); l++) {
					if (abs(Distance(ans[l], ans.back())) <= EPS) {
						ans.pop_back();
						break;
					}
				}
			}
		}
		//for (auto i : ans) {
		//	cout << fixed << setprecision(20) << i.x << " ans " << i.y << endl;
		//}
		if (ans.size() == 0) {
			cout << "None\n";
		}
		else if (ans.size() == 1) {
			cout << fixed << setprecision(20) << ans[0].x << " " << ans[0].y << endl;
		}
		else {
			cout << "Many\n";
		}
		cin >> N;
	}
}
accuracy: 1
time_ms: 60
memory_kb: 3752
final_rank: 12

code_snippet: #include <bits/stdc++.h>
#define double long double
using namespace std;
typedef complex<double> P; //Point
typedef pair<P,P> L; //Line, Segment
const double EPS = 1e-10;
const double eps = 1e-10;
double dot(P a, P b){ return real(conj(a)*b);}
double cross(P a, P b){ return imag(conj(a)*b);}
bool eq(double a,double b){return abs(a-b)<eps;}
bool eq(P a,P b){return eq(a.real(),b.real())&&eq(a.imag(),b.imag());}
double getDistanceLP(L s, P p){
 
  assert( !eq( s.first, s.second) );
 
  return abs(cross(s.second - s.first, p - s.first) / abs(s.second - s.first));
}
bool isParalell(L a,L b){return  eq(0,cross(a.second-a.first,b.second-b.first));}
 
P crossPoint(L l, L m){
  double A = cross(l.second - l.first, m.second - m.first);
  double B = cross(l.second - l.first, l.second - m.first);
  if(fabs(A) < EPS && fabs(B) < EPS) return m.first;
  else if(fabs(A) >= EPS) return m.first + B / A * (m.second - m.first);
}
 
vector<L> A;
bool check(P a){
  double dis = getDistanceLP(A[0],a);
 
  for(int i=0;i<(int)A.size();i++)
    if(!eq(dis,getDistanceLP(A[i],a))) return 0;
 
  return  1;
}
 
L calc(P o,P a,P b){
  a-=o,b-=o;
  return L(o,(a/abs(a) + b/abs(b)) + o);
}
 
int main(){
  int n;
  while(cin>>n,n){
    A.resize(n);
    for(int i=0,x1,y1,x2,y2;i<n;i++){
      cin>>x1>>y1>>x2>>y2;
      A[i] = L(P(x1,y1),P(x2,y2));
    }
 
 
    if(n<=2){cout<<"Many"<<endl;continue;}
     
    vector<L> B; 
    for(int i=0;i<n;i++)
      for(int j=0;j<i;j++){
    L a = A[i], b = A[j];
 
    if(isParalell(a,b)||B.size()>100)continue;
 
    P o = crossPoint(a,b);
    P va=a.second-a.first;
    P vb=b.second-b.first;
    va /= abs(va);
    vb /= abs(vb);
 
    B.push_back( L( o , o+va+vb) );
    B.push_back( L( o , o+va-vb ) );
 
      }
 
    vector<P> ans;
    for(int i=0;i<(int)B.size();i++)
      for(int j=i+1;j<(int)B.size();j++){
    L a = B[i], b = B[j];
    if(isParalell(a,b)) continue;
    P c = crossPoint(a,b);
    if(check(c)&&(ans.empty()||!eq(ans[0],c))) ans.push_back(c);
 
      }
     
    if(ans.size()>=2) cout<<"Many"<<endl;
    else if(ans.empty()) cout<<"None"<<endl;
    else printf("%Lf %Lf\n",ans[0].real(),ans[0].imag());
  }
  return 0;
}
accuracy: 1
time_ms: 50
memory_kb: 3324
final_rank: 11

code_snippet: #include <bits/stdc++.h>
#define double long double
using namespace std;
typedef complex<double> P; //Point
typedef pair<P,P> L; //Line, Segment
const double EPS = 1e-10;
const double eps = 1e-10;
double dot(P a, P b){ return real(conj(a)*b);}
double cross(P a, P b){ return imag(conj(a)*b);}
bool eq(double a,double b){return abs(a-b)<eps;}
bool eq(P a,P b){return eq(a.real(),b.real())&&eq(a.imag(),b.imag());}
double getDistanceLP(L s, P p){

  assert( !eq( s.first, s.second) );

  return abs(cross(s.second - s.first, p - s.first) / abs(s.second - s.first));
}
bool isParalell(L a,L b){return  eq(0,cross(a.second-a.first,b.second-b.first));}

P crossPoint(L l, L m){
  double A = cross(l.second - l.first, m.second - m.first);
  double B = cross(l.second - l.first, l.second - m.first);
  if(fabs(A) < EPS && fabs(B) < EPS) return m.first;
  else if(fabs(A) >= EPS) return m.first + B / A * (m.second - m.first);
}

vector<L> A;
bool check(P a){
  double dis = getDistanceLP(A[0],a);

  for(int i=0;i<(int)A.size();i++)
    if(!eq(dis,getDistanceLP(A[i],a))) return 0;

  return  1;
}

L calc(P o,P a,P b){
  a-=o,b-=o;
  return L(o,(a/abs(a) + b/abs(b)) + o);
}

int main(){
  int n;
  while(cin>>n,n){
    A.resize(n);
    for(int i=0,x1,y1,x2,y2;i<n;i++){
      cin>>x1>>y1>>x2>>y2;
      A[i] = L(P(x1,y1),P(x2,y2));
    }


    if(n<=2){cout<<"Many"<<endl;continue;}
    
    vector<L> B; 
    for(int i=0;i<n;i++)
      for(int j=0;j<i;j++){
	L a = A[i], b = A[j];

	if(isParalell(a,b)||B.size()>100)continue;

	P o = crossPoint(a,b);
	P va=a.second-a.first;
	P vb=b.second-b.first;
	va /= abs(va);
	vb /= abs(vb);

	B.push_back( L( o , o+va+vb) );
	B.push_back( L( o , o+va-vb ) );

      }

    vector<P> ans;
    for(int i=0;i<(int)B.size();i++)
      for(int j=i+1;j<(int)B.size();j++){
	L a = B[i], b = B[j];
	if(isParalell(a,b)) continue;
	P c = crossPoint(a,b);
	if(check(c)&&(ans.empty()||!eq(ans[0],c))) ans.push_back(c);

      }
    
    if(ans.size()>=2) cout<<"Many"<<endl;
    else if(ans.empty()) cout<<"None"<<endl;
    else printf("%Lf %Lf\n",ans[0].real(),ans[0].imag());
  }
  return 0;
}
accuracy: 1
time_ms: 50
memory_kb: 3252
final_rank: 9

code_snippet: #include <bits/stdc++.h>
#define double long double
using namespace std;
typedef complex<double> P; //Point
typedef pair<P,P> L; //Line, Segment
const double EPS = 1e-10;
const double eps = 1e-10;
double dot(P a, P b){ return real(conj(a)*b);}
double cross(P a, P b){ return imag(conj(a)*b);}
bool eq(double a,double b){return abs(a-b)<eps;}
bool eq(P a,P b){return eq(a.real(),b.real())&&eq(a.imag(),b.imag());}
double getDistanceLP(L s, P p){

  assert( !eq( s.first, s.second) );

  return abs(cross(s.second - s.first, p - s.first) / abs(s.second - s.first));
}
bool isParalell(L a,L b){return  eq(0,cross(a.second-a.first,b.second-b.first));}

P crossPoint(L l, L m){
  double A = cross(l.second - l.first, m.second - m.first);
  double B = cross(l.second - l.first, l.second - m.first);
  if(fabs(A) < EPS && fabs(B) < EPS) return m.first;
  else if(fabs(A) >= EPS) return m.first + B / A * (m.second - m.first);
}

vector<L> A;
bool check(P a){
  double dis = getDistanceLP(A[0],a);

  for(int i=0;i<(int)A.size();i++)
    if(!eq(dis,getDistanceLP(A[i],a))) return 0;

  return  1;
}

L calc(P o,P a,P b){
  a-=o,b-=o;
  return L(o,(a/abs(a) + b/abs(b)) + o);
}

/*
L StoL(L a){
  P t=a.second - a.first;
  t = (t/abs(t)) * (double)1e6;
  return L(-t+a.first,t+a.first);
}
*/

P gv(L l){
  return l.second-l.first;
}

int main(){
  int n;
  while(cin>>n,n){
    A.resize(n);
    for(int i=0,x1,y1,x2,y2;i<n;i++){
      cin>>x1>>y1>>x2>>y2;
      A[i] = L(P(x1,y1),P(x2,y2));
    }


    if(n<=2){cout<<"Many"<<endl;continue;}
    
    vector<L> B; 
    for(int i=0;i<n;i++)
      for(int j=0;j<i;j++){
	L a = A[i], b = A[j];

	if(isParalell(a,b)||B.size()>100)continue;

	P o = crossPoint(a,b);

	//printf("%.8Lf %.8Lf\n", (double)o.real(), (double)o.imag() );

	//cout<<"ij"<<i<<j<<endl;
	//printf("o=(%Lf,%Lf)\n",o.real(),o.imag());
	//cout<<"o="<<o<<endl;
	//cout<<"a="<<a.first<<" "<<a.second<<endl;
	//cout<<"b="<<b.first<<" "<<b.second<<endl<<endl;

	P va=a.second-a.first;
	P vb=b.second-b.first;
	va /= abs(va);
	vb /= abs(vb);

	B.push_back( L( o , o+va+vb) );
	B.push_back( L( o , o+va-vb ) );

      }


    //  for(int i=0;i<B.size();i++)cout<<B[i].first<<" "<<B[i].second<<endl;
       
    vector<P> ans;
    for(int i=0;i<(int)B.size();i++)
      for(int j=i+1;j<(int)B.size();j++){


	L a = B[i], b = B[j];

	if(isParalell(a,b)) continue;

	P c = crossPoint(a,b);

	if(check(c)&&(ans.empty()||!eq(ans[0],c))) ans.push_back(c);

      }
    
    if(ans.size()>=2) cout<<"Many"<<endl;
    else if(ans.empty()) cout<<"None"<<endl;
    else printf("%Lf %Lf\n",ans[0].real(),ans[0].imag());
  }
  return 0;
}
accuracy: 1
time_ms: 60
memory_kb: 3292
final_rank: 10

code_snippet: #include<bits/stdc++.h>
#define EPS (1e-6)
#define equals(a,b) (fabs((a)-(b)) < EPS)
#define PI 3.141592653589793238
 
using namespace std;
 
static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;
 
struct Point{
  double x,y;
  Point(){}
  Point(double x,double y) :x(x),y(y){}
  Point operator + (Point p) {return Point(x+p.x,y+p.y);}
  Point operator - (Point p) {return Point(x-p.x,y-p.y);}
  Point operator * (double k) {return Point(x*k,y*k);}
  Point operator / (double k) {return Point(x/k,y/k);}
  double norm(){return x*x+y*y;}
  double abs(){return sqrt(norm());}
 
  bool operator < (const Point &p) const{
    return x!=p.x ? x < p.x : y < p.y;
  }
 
  bool operator == (const Point &p) const{
    return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
  }
};
 
istream &operator >> (istream &is,Point &p){
  is>>p.x>>p.y;
  return is;
}
 
typedef Point Vector;
typedef vector<Point> Polygon;
 
struct Segment{
  Point p1,p2;
  Segment(){}
  Segment(Point p1, Point p2):p1(p1),p2(p2){}
};
typedef Segment Line;
 
struct Circle{
  Point c;
  double r;
  Circle(){}
  Circle(Point c,double r):c(c),r(r){}
};
 
double norm(Vector a){
  return a.x*a.x+a.y*a.y;
}
double abs(Vector a){
  return sqrt(norm(a));
}
double dot(Vector a,Vector b){
  return a.x*b.x+a.y*b.y;
}
double cross(Vector a,Vector b){
  return a.x*b.y-a.y*b.x;
}
 
bool isOrthogonal(Vector a,Vector b){
  return equals(dot(a,b),0.0);
}
 
bool isOrthogonal(Point a1,Point a2,Point b1,Point b2){
  return isOrthogonal(a1-a2,b1-b2);
}
 
bool isOrthogonal(Segment s1,Segment s2){
  return equals(dot(s1.p2-s1.p1,s2.p2-s2.p1),0.0);
}
 
bool isParallel(Vector a,Vector b){
  return equals(cross(a,b),0.0);
}
 
bool isParallel(Point a1,Point a2,Point b1,Point b2){
  return isParallel(a1-a2,b1-b2);
}
 
bool isParallel(Segment s1,Segment s2){
  return equals(cross(s1.p2-s1.p1,s2.p2-s2.p1),0.0); 
}
 
Point project(Segment s,Point p){
  Vector base=s.p2-s.p1;
  double r=dot(p-s.p1,base)/norm(base);
  return s.p1+base*r;
}
 
Point reflect(Segment s,Point p){
  return p+(project(s,p)-p)*2.0;
}
 
int ccw(Point p0,Point p1,Point p2){
  Vector a = p1-p0;
  Vector b = p2-p0;
  if(cross(a,b) > EPS) return COUNTER_CLOCKWISE;
  if(cross(a,b) < -EPS) return CLOCKWISE;
  if(dot(a,b) < -EPS) return ONLINE_BACK;
  if(a.norm()<b.norm()) return ONLINE_FRONT;
  return ON_SEGMENT;
}
 
bool intersect(Point p1,Point p2,Point p3,Point p4){
  return (ccw(p1,p2,p3)*ccw(p1,p2,p4) <= 0 &&
      ccw(p3,p4,p1)*ccw(p3,p4,p2) <= 0 );
}
 
bool intersect(Segment s1,Segment s2){
  return intersect(s1.p1,s1.p2,s2.p1,s2.p2);
}
 
double getDistanceLP(Line l,Point p){
  return abs(cross(l.p2-l.p1,p-l.p1)/abs(l.p2-l.p1));
}
 
double getDistanceSP(Segment s,Point p){
  if(dot(s.p2-s.p1,p-s.p1) < 0.0 ) return abs(p-s.p1);
  if(dot(s.p1-s.p2,p-s.p2) < 0.0 ) return abs(p-s.p2);
  return getDistanceLP(s,p);
}
 
double getDistance(Segment s1,Segment s2){
  if(intersect(s1,s2)) return 0.0;
  return min(min(getDistanceSP(s1,s2.p1),getDistanceSP(s1,s2.p2)),
         min(getDistanceSP(s2,s1.p1),getDistanceSP(s2,s1.p2)));
}
 
Point getCrossPoint(Segment s1,Segment s2){
  Vector base=s2.p2-s2.p1;
  double d1=abs(cross(base,s1.p1-s2.p1));
  double d2=abs(cross(base,s1.p2-s2.p1));
  double t=d1/(d1+d2);
  return s1.p1+(s1.p2-s1.p1)*t;
}
 
 
pair<Point,Point> getCrossPoints(Circle c,Line l){
  Vector pr=project(l,c.c);
  Vector e=(l.p2-l.p1)/abs(l.p2-l.p1);
  double base=sqrt(c.r*c.r-norm(pr-c.c));
  return make_pair(pr+e*base,pr-e*base);
}
 
 
double arg(Vector p){
  return atan2(p.y,p.x);
}
 
Vector polar(double a,double r){
  return Point(cos(r)*a,sin(r)*a);
}
 
pair<Point,Point> getCrossPoints(Circle c1,Circle c2){
  double d=abs(c1.c-c2.c);
  double a=acos((c1.r*c1.r+d*d-c2.r*c2.r)/(2*c1.r*d));
  double t=arg(c2.c-c1.c);
  return make_pair(c1.c+polar(c1.r,t+a),c1.c+polar(c1.r,t-a));
}
 
int contains(Polygon g,Point p){
  int n=g.size();
  bool x=false;
  for(int i=0;i<n;i++){
    Point a=g[i]-p,b=g[(i+1)%n]-p;
    if(fabs(cross(a,b)) < EPS && dot(a,b) < EPS) return 1;
    if(a.y>b.y) swap(a,b);
    if(a.y < EPS && EPS < b.y && cross(a,b) > EPS ) x = !x;
  }
  return (x?2:0);
}
 
Polygon andrewScan(Polygon s){
  Polygon u,l;
  if(s.size()<3) return s;
  sort(s.begin(),s.end());
  u.push_back(s[0]);
  u.push_back(s[1]);
  l.push_back(s[s.size()-1]);
  l.push_back(s[s.size()-2]);
  for(int i=2;i<(int)s.size();i++){
    for(int n=u.size();n>=2&&ccw(u[n-2],u[n-1],s[i]) != CLOCKWISE;n--){
      u.pop_back();
    }
    u.push_back(s[i]);
  } 
  for(int i=s.size()-3;i>=0;i--){
    for(int n=l.size();n>=2&&ccw(l[n-2],l[n-1],s[i]) != CLOCKWISE;n--){
      l.pop_back();
    }
    l.push_back(s[i]);
  }
  reverse(l.begin(),l.end());
  for(int i=u.size()-2;i>=1;i--) l.push_back(u[i]);
  return l;
} 
 
double area(Polygon s){
  double res=0;
  for(int i=0;i<(int)s.size();i++){
    res+=cross(s[i],s[(i+1)%s.size()])/2.0;
  }
  return abs(res);
}
 
 
Point getCrossPointLL(Line l1,Line l2){
  double a=cross(l1.p2-l1.p1,l2.p2-l2.p1);
  double b=cross(l1.p2-l1.p1,l1.p2-l2.p1);
  if(abs(a)<EPS&&abs(b)<EPS) return l2.p1;
  return l2.p1+(l2.p2-l2.p1)*(b/a);
}
 
Polygon convexCut(Polygon p,Line l){
  Polygon q;
  for(int i=0;i<(int)p.size();i++){
    Point a=p[i],b=p[(i+1)%p.size()];
    if(ccw(l.p1,l.p2,a)!=-1) q.push_back(a);
    if(ccw(l.p1,l.p2,a)*ccw(l.p1,l.p2,b)<0)
      q.push_back(getCrossPointLL(Line(a,b),l));
  }
  return q;
}
 
Line bisector(Point p1,Point p2){
  Circle c1=Circle(p1,abs(p1-p2)),c2=Circle(p2,abs(p1-p2));
  pair<Point,Point> p=getCrossPoints(c1,c2);
  if(cross(p2-p1,p.first-p1)>0) swap(p.first,p.second);
  return Line(p.first,p.second);
}
 
Vector spin(Vector v,double theta){
  Vector res;
  res.x=cos(theta)*v.x-sin(theta)*v.y;
  res.y=sin(theta)*v.x+cos(theta)*v.y;
  return res;
}
 
vector<Line> corner(Line l1,Line l2){
  vector<Line> res;
  if(isParallel(l1,l2)){
    double d=getDistanceLP(l1,l2.p1)/2.0;
    Vector v1=l1.p2-l1.p1;
    v1=v1/v1.abs()*d;
    Point p=l2.p1+spin(v1,90.0*(PI/180.0));
    double d1=getDistanceLP(l1,p);
    double d2=getDistanceLP(l2,p);
    if(abs(d1-d2)>d){
      p=l2.p1+spin(v1,-90.0*(PI/180.0));
    }
    res.push_back(Line(p,p+v1));
  }else{
    Point p=getCrossPointLL(l1,l2);
    Vector v1=l1.p2-l1.p1,v2=l2.p2-l2.p1;
    v1=v1*1000/v1.abs();
    v2=v2*1000/v2.abs();
    res.push_back(Line(p,p+(v1+v2)));
    res.push_back(Line(p,p+spin(v1+v2,90.0*(PI/180.0))));
  }
  return res;
}
 
int main(){
  int n;
  while(cin>>n,n){
    Line l[n];
    for(int i=0;i<n;i++) cin>>l[i].p1>>l[i].p2;
    if(n<=2){
      cout<<"Many"<<endl;
      continue;
    }
    Polygon ans;
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
    for(int k=j+1;k<n;k++){
      vector<Line> l1=corner(l[i],l[j]);
      vector<Line> l2=corner(l[i],l[k]);
      for(int a=0;a<(int)l1.size();a++){
        for(int b=0;b<(int)l2.size();b++){
          if(isParallel(l1[a],l2[b])) continue;
          Point p=getCrossPointLL(l1[a],l2[b]);
          bool f=1;
          double d=getDistanceLP(l[0],p);
          for(int c=1;c<n;c++) f&=equals(d,getDistanceLP(l[c],p));
          if(f){
        bool ff=0;
        for(int c=0;c<(int)ans.size();c++){
          ff|=ans[c]==p;
        }
        if(!ff) ans.push_back(p);
        if(ans.size()>1) goto END;
          }
        }
      }
    }
      }
    }
  END:
     
    if(ans.size()==0){
      cout<<"None"<<endl;
      continue;
    }
    if(ans.size()==1){
      printf("%.6f %.6f\n",ans[0].x,ans[0].y);
      continue;
    }
    if(ans.size()>=2){
      cout<<"Many"<<endl;
      continue;
    }
  }
  return 0;
}
accuracy: 1
time_ms: 3330
memory_kb: 3524
final_rank: 19

code_snippet: #include<bits/stdc++.h>
#define inf 1<<29
#define linf 1e18
#define eps (1e-6)
#define mod 1000000007
#define pi acos(-1)
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define pd(a) printf("%.10f\n",(double)(a))
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define equals(a,b) (fabs((a)-(b))<eps)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<double,int> pdi;
typedef vector<int> vi;
typedef vector<pii> vpi;
const int dx[8]={1,0,-1,0,1,1,-1,-1};
const int dy[8]={0,1,0,-1,1,-1,1,-1};

class Point{
public:
  double x,y;
  Point(double x=0,double y=0):x(x),y(y){}

  Point operator+(Point p){ return Point(x+p.x,y+p.y);}
  Point operator-(Point p){ return Point(x-p.x,y-p.y);}
  Point operator*(double k){ return Point(x*k,y*k);}
  Point operator/(double k){ return Point(x/k,y/k);}
  bool operator<(Point p)const{ 
    return (x!=p.x ? x-p.x<-eps : y-p.y<-eps);}
  bool operator==(Point p)const{ 
    return fabs(x-p.x)<eps && fabs(y-p.y)<eps;}

  double abs(){ return sqrt(norm());}
  double norm(){ return (x*x+y*y);}
};
typedef Point Vector;
typedef vector<Point> Polygon;

class Segment{
public:
  Point p1,p2;
  Segment(Point p1=Point(),Point p2=Point()):p1(p1),p2(p2){}
};
typedef Segment Line;

double norm(Vector a){ return (a.x*a.x+a.y*a.y);}
double abs(Vector a){ return sqrt(norm(a));}
double dot(Vector a,Vector b){ return (a.x*b.x+a.y*b.y);}
double cross(Vector a,Vector b){ return (a.x*b.y-a.y*b.x);}

bool isParallel(Segment s,Segment t){
  return equals(cross(s.p1-s.p2,t.p1-t.p2),0.0);
}

double getDistanceLP(Line l,Point p){
  return abs(cross(l.p2-l.p1,p-l.p1)/abs(l.p2-l.p1));
}

Point getCrossPointLL(Line a,Line b){
  double A=cross(a.p2-a.p1,b.p2-b.p1);
  double B=cross(a.p2-a.p1,a.p2-b.p1);
  if(abs(A)<eps || abs(B)<eps)return b.p1;
  return b.p1+(b.p2-b.p1)*(B/A);
}

Point rotate(Point base,Point a,double r){
  Point b=a-base;
  a.x=b.x*cos((r/180.0)*pi)-b.y*sin((r/180.0)*pi);
  a.y=b.x*sin((r/180.0)*pi)+b.y*cos((r/180.0)*pi);
  a=a+base;
  return a;
}

double getAngle(Vector a,Vector b){
  double tmp=dot(a,b)/(abs(a)*abs(b));
  if(tmp<-1.0)tmp=-1.0;
  if(1.0<tmp)tmp=1.0;
  double r=acos(tmp)*180.0/pi;
  return r;
}

vector<Point> unique(vector<Point> vp){
  vector<Point> res;
  if(vp.empty())return res;
  sort(all(vp));
  res.pb(vp[0]);
  FOR(i,1,vp.size())if(!(vp[i]==res.back()))res.pb(vp[i]);
  return res;
}

typedef pair<Line,Line> pll;

int n;
vector<Segment> vs;
vector<Point> vp;

pll getS(Line a,Line b){
  Point m=getCrossPointLL(a,b);
  double r=getAngle(a.p1-a.p2,b.p1-b.p2);
  Line c(rotate(m,a.p1,r/2.0),rotate(m,a.p1,180+r/2.0));
  Line d(rotate(m,a.p1,(180.0-r)/2.0),rotate(m,a.p1,180+(180.0-r)/2.0));
  return mp(c,d);
}

bool check2(Point p){
  double dis=getDistanceLP(vs[0],p);
  FOR(i,1,n)
    if(!equals(dis,getDistanceLP(vs[i],p)))return false;
  return true;
}

void check1(Line a,Line b,Line c){
  Point d=getCrossPointLL(a,c),e=getCrossPointLL(b,c);
  Point m=d+(e-d)/2.0;
  Line L(m+(a.p1-a.p2),m);
  pll f=getS(a,c);
  d=getCrossPointLL(f.f,L);
  if(check2(d))vp.pb(d);
  d=getCrossPointLL(f.s,L);
  if(check2(d))vp.pb(d);
  pll s=getS(b,c);
  d=getCrossPointLL(s.f,L);
  if(check2(d))vp.pb(d);
  d=getCrossPointLL(s.s,L);
  if(check2(d))vp.pb(d);
  return;
}

void check3(pll a,pll b){
  if(!isParallel(a.f,b.f)){
    Point c=getCrossPointLL(a.f,b.f);
    if(check2(c))vp.pb(c);
  }
  if(!isParallel(a.f,b.s)){
    Point c=getCrossPointLL(a.f,b.s);
    if(check2(c))vp.pb(c);
  }
  if(!isParallel(a.s,b.f)){
    Point c=getCrossPointLL(a.s,b.f);
    if(check2(c))vp.pb(c);
  }
  if(!isParallel(a.s,b.s)){
    Point c=getCrossPointLL(a.s,b.s);
    if(check2(c))vp.pb(c);
  }
}

void solve(){
  if(n<=2){
    cout<<"Many"<<endl;
    return;
  }
  FOR(i,0,n){
    FOR(j,0,n){
      FOR(k,0,n){
        if(i==j || i==k || j==k)continue;
        if(isParallel(vs[i],vs[j]) && isParallel(vs[i],vs[k]))continue;
        else if(isParallel(vs[i],vs[j]))check1(vs[i],vs[j],vs[k]);
        //else if(isParallel(vs[j],vs[k]))check1(vs[j],vs[k],vs[i]);
        //else if(isParallel(vs[k],vs[i]))check1(vs[k],vs[i],vs[j]);
        else {
          pll a=getS(vs[i],vs[j]);
          pll b=getS(vs[j],vs[k]);
          pll c=getS(vs[k],vs[i]);
          check3(a,b);
         // check3(b,c);
         // check3(c,a);
        }
      }
    }
  }
  vp=unique(vp);
  if(vp.empty())cout<<"None"<<endl;
  else if(vp.size()>1)cout<<"Many"<<endl;
  else printf("%.10f %.10f\n",vp[0].x,vp[0].y);
  return;
}

int main()
{
  while(cin>>n && n){
    vs.clear();
    vp.clear();
    FOR(i,0,n){
      int a,b,c,d;
      cin>>a>>b>>c>>d;
      vs.pb(Segment(Point(a,b),Point(c,d)));
    }
    solve();
  }
  return 0;
}
accuracy: 1
time_ms: 5490
memory_kb: 11456
final_rank: 20

code_snippet: #include<iostream>
#include<complex>
#include<utility>
#include<vector>

using namespace std;

typedef complex<double> P;

int x_1[100],y_1[100],x_2[100],y_2[100];
double eps=1e-6;

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

bool on(P a,pair<P,P> l){
  return fabs(cross(a-l.first,l.second-l.first))<sqrt(eps);
}

P cp(pair<P,P> e,pair<P,P> f){
  P a=e.second-e.first;
  P b=f.second-f.first;
  double acb=cross(a,b);
  if(fabs(acb)<eps)throw 0;
  return e.first+a*cross(f.first-e.first,b)/acb;
}  

vector<pair<P,P> > elines(int x1,int x2){
  P a1=P(x_1[x1],y_1[x1]),a2=P(x_2[x1],y_2[x1]);
  P b1=P(x_1[x2],y_1[x2]),b2=P(x_2[x2],y_2[x2]);
  vector<pair<P,P> > v;
  try{
    auto cpab=cp(make_pair(a1,a2),make_pair(b1,b2));
    P ac=a1-a2,bc=b1-b2;
    P d=ac/abs(ac)+bc/abs(bc);
    v.emplace_back(cpab,cpab+d);
    v.emplace_back(cpab,cpab+d*P(0,1));
  }catch(...){
    //P m=(a1+b1)/2.l;
    P m=(a1+b1)/2.;
    v.emplace_back(m,m+a2-a1);
  }
  return v;
}
    
int main(){
  for(int n;cin>>n,n;){
    vector<pair<P,P> > lines;
    vector<P> points;
    for(int i=0;i<n;i++){
      cin>>x_1[i]>>y_1[i]>>x_2[i]>>y_2[i];
      for(int j=0;j<i;j++){
	if(i==1){
	  lines=elines(i,j);
	}else{
	  vector<pair<P,P> > nl;
	  vector<P> np;
	  for(auto e:elines(i,j)){
	    for(auto f:lines){
	      try{
		auto cpef=cp(e,f);
		np.push_back(cpef);
	      }catch(...){
		if(on(f.first,e)&&on(f.second,e)){
		  nl.push_back(f);
		}
	      }
	    }
	    for(auto f:points){
	      if(on(f,e)){
		np.push_back(f);
	      }
	    }
	  }
	  lines=nl;
	  points.clear();
	  for(int i=0;i<np.size();i++){
	    bool has=false;
	    for(auto e:points){
	      has|=abs(e-np[i])<eps;
	    }
	    if(!has){
	      points.push_back(np[i]);
	    }
	  }
	}
      }
    }
    if(n==1||!lines.empty()||points.size()>1){
      cout<<"Many"<<endl;
    }else if(points.empty()){
      cout<<"None"<<endl;
    }else{
      cout<<fixed<<points[0].real()<<' '<<points[0].imag()<<endl;
    }
  }
}
accuracy: 1
time_ms: 10
memory_kb: 1352
final_rank: 1

code_snippet: #include<iostream>
#include<complex>
#include<utility>
#include<vector>

using namespace std;

#define double long double

typedef complex<double> P;

int x_1[100],y_1[100],x_2[100],y_2[100];
double eps=1e-5;

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

bool on(P a,pair<P,P> l){
  return fabs(cross(a-l.first,l.second-l.first))<eps;
}

P cp(pair<P,P> e,pair<P,P> f){
  P a=e.second-e.first;
  P b=f.second-f.first;
  double acb=cross(a,b);
  if(fabs(acb)<eps)throw 0;
  return e.first+a*cross(f.first-e.first,b)/acb;
}  

vector<pair<P,P> > elines(int x1,int x2){
  P a1=P(x_1[x1],y_1[x1]),a2=P(x_2[x1],y_2[x1]);
  P b1=P(x_1[x2],y_1[x2]),b2=P(x_2[x2],y_2[x2]);
  vector<pair<P,P> > v;
  try{
    auto cpab=cp(make_pair(a1,a2),make_pair(b1,b2));
    P ac=a1-a2,bc=b1-b2;
    P d=ac/abs(ac)+bc/abs(bc);
    v.emplace_back(cpab,cpab+d);
    v.emplace_back(cpab,cpab+d*P(0,1));
  }catch(...){
    P m=(a1+b1)/2.l;
    //    P m=(a1+b1)/2.;
    v.emplace_back(m,m+a2-a1);
  }
  return v;
}
    
int main(){
  for(int n;cin>>n,n;){
    vector<pair<P,P> > lines;
    vector<P> points;
    for(int i=0;i<n;i++){
      cin>>x_1[i]>>y_1[i]>>x_2[i]>>y_2[i];
      for(int j=0;j<i;j++){
	if(i==1){
	  lines=elines(i,j);
	}else{
	  vector<pair<P,P> > nl;
	  vector<P> np;
	  for(auto e:elines(i,j)){
	    for(auto f:lines){
	      try{
		auto cpef=cp(e,f);
		np.push_back(cpef);
	      }catch(...){
		if(on(f.first,e)&&on(f.second,e)){
		  nl.push_back(f);
		}
	      }
	    }
	    for(auto f:points){
	      if(on(f,e)){
		np.push_back(f);
	      }
	    }
	  }
	  lines=nl;
	  points.clear();
	  for(int i=0;i<np.size();i++){
	    bool has=false;
	    for(auto e:points){
	      has|=abs(e-np[i])<eps;
	    }
	    if(!has){
	      points.push_back(np[i]);
	    }
	  }
	}
      }
    }
    if(n==1||!lines.empty()||points.size()>1){
      cout<<"Many"<<endl;
    }else if(points.empty()){
      cout<<"None"<<endl;
    }else{
      cout<<fixed<<points[0].real()<<' '<<points[0].imag()<<endl;
    }
  }
}
accuracy: 1
time_ms: 10
memory_kb: 1352
final_rank: 1

code_snippet: #include<bits/stdc++.h>
   
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-6)
#define equals(a,b) (fabs((a)-(b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1 
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
   
using namespace std;
   
class Point{
public:
  double x,y;
   
  Point(double x = 0,double y = 0): x(x),y(y){}
   
  Point operator + (Point p){return Point(x+p.x,y+p.y);}
  Point operator - (Point p){return Point(x-p.x,y-p.y);}
  Point operator * (double a){return Point(a*x,a*y);}
  Point operator / (double a){return Point(x/a,y/a);}
  Point operator * (Point a){ return Point(x * a.x - y * a.y, x * a.y + y * a.x); }
   
  bool operator < (const Point& p) const{ return !equals(x,p.x)?x<p.x:(!equals(y,p.y)&&y<p.y); }
   
  bool operator == (const Point& p)const{ return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS; }
   
};
   
struct Segment{
  Point p1,p2;
  int index;
  Segment(Point p1 = Point(),Point p2 = Point(),int index=-1):p1(p1),p2(p2),index(index){}
  bool operator <  (const Segment& s) const { return ( p2 == s.p2 ) ? p1 < s.p1 : p2 < s.p2; }
  bool operator == (const Segment& s) const { return ( s.p1 == p1 && s.p2 == p2 ) || ( s.p1 == p2 && s.p2 == p1 ); }
   
};
   
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
   
double dot(Point a,Point b){ return a.x*b.x + a.y*b.y; }
   
double cross(Point a,Point b){ return a.x*b.y - a.y*b.x; }
   
double norm(Point a){ return a.x*a.x+a.y*a.y; }
   
double abs(Point a){ return sqrt(norm(a)); }
   
Point rotate(Point a,double rad){ return Point(cos(rad)*a.x - sin(rad)*a.y,sin(rad)*a.x + cos(rad)*a.y); }
   
double toRad(double agl){ return agl*M_PI/180.0; }
   
double getArg(Point a,Point b,Point c){
  double arg1 = atan2(b.y-a.y,b.x-a.x);
  double arg2 = atan2(c.y-b.y,c.x-b.x);
  double arg = fabs( arg1 - arg2 );
  while( arg > M_PI ) arg -= 2.0 * M_PI;
  return fabs(arg);
}
   
int ccw(Point p0,Point p1,Point p2){
  Point a = p1-p0;
  Point b = p2-p0;
  if(cross(a,b) > EPS)return COUNTER_CLOCKWISE;
  if(cross(a,b) < -EPS)return CLOCKWISE;
  if(dot(a,b) < -EPS)return ONLINE_BACK;
  if(norm(a) < norm(b))return ONLINE_FRONT;
  return ON_SEGMENT;
}
   
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2-l.p1, m.p2-m.p1)) > EPS || // non-parallel
         abs(cross(l.p2-l.p1, m.p1-l.p1)) < EPS;   // same line
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2-l.p1, s.p1-l.p1)*       // s[0] is left of l
         cross(l.p2-l.p1, s.p2-l.p1) < EPS; // s[1] is right of l
}
bool intersectLP(Line l,Point p) {
  return abs(cross(l.p2-p, l.p1-p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1,s.p2,t.p1)*ccw(s.p1,s.p2,t.p2) <= 0 &&
         ccw(t.p1,t.p2,s.p1)*ccw(t.p1,t.p2,s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1-p)+abs(s.p2-p)-abs(s.p2-s.p1) < EPS; // triangle inequality
}
   
Point projection(Line l,Point p) {
  double t = dot(p-l.p1, l.p1-l.p2) / norm(l.p1-l.p2);
  return l.p1 + (l.p1-l.p2)*t;
}
Point reflection(Line l,Point p) {
  return p + (projection(l, p) - p) * 2;
}
double distanceLP(Line l, Point p) {
  return abs(p - projection(l, p));
}
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
   
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
   
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
   
Point crosspoint(Line l,Line m){
  double A = cross(l.p2-l.p1,m.p2-m.p1);
  double B = cross(l.p2-l.p1,l.p2-m.p1);
  if(abs(A) < EPS && abs(B) < EPS){
    vector<Point> vec;
    vec.push_back(l.p1),vec.push_back(l.p2),vec.push_back(m.p1),vec.push_back(m.p2);
    sort(vec.begin(),vec.end());
    assert(vec[1] == vec[2]); 
    return vec[1];
  }
  if(abs(A) < EPS)assert(false);
  return m.p1 + (m.p2-m.p1)*(B/A);
}
   
double cross3p(Point p,Point q,Point r) { return (r.x-q.x) * (p.y -q.y) - (r.y - q.y) * (p.x - q.x); }
     
bool collinear(Point p,Point q,Point r) { return fabs(cross3p(p,q,r)) < EPS; }
     
bool ccwtest(Point p,Point q,Point r){ return cross3p(p,q,r) > 0; }
    
bool onSegment(Point p,Point q,Point r){
  return collinear(p,q,r) && equals(sqrt(pow(p.x-r.x,2)+pow(p.y-r.y,2)) + sqrt(pow(r.x-q.x,2) + pow(r.y-q.y,2) ),sqrt(pow(p.x-q.x,2)+pow(p.y-q.y,2)) ) ;
}
   
// ------------------
   
Line calcLine(Line line1,Line line2,Point p1,Point p2){
 
  Point cp = crosspoint(line1,line2);
  int res = ccw(cp,p1,p2);
 
  Point base;
  if( res == COUNTER_CLOCKWISE ) base = p1;
  else                           base = p2;
  Point not_base = (base==p1)?p2:p1;
  double arg_a = (toRad(180.0)-getArg(base,cp,not_base));
 
  Vector e = ( base - cp ) / abs( base - cp );
  e = rotate(e,arg_a/2.0);
  Line tmp = Line(cp,cp+e*100);
  return tmp;
}
   
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec){
   
  if( vec.size() <= 2 ) { cout << MANY << endl; return; }
   
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i,n) REP(j,i+1,n){
    if( equals(cross(vec[i].p1-vec[i].p2,vec[j].p1-vec[j].p2),0.0) ) {
      Vector e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      e = rotate(e,toRad(90));
      Line line = Line(vec[i].p1,vec[i].p1+e*100);
      Point cp1 = crosspoint(line,vec[i]);
      Point cp2 = crosspoint(line,vec[j]);
      Point mp = ( cp1 + cp2 ) / 2.0;
      e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      line = Line(mp,mp+e*100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i],vec[j]);
      Point I = ( vec[i].p1 == cp ) ? vec[i].p2 : vec[i].p1;
      Point J = ( vec[j].p1 == cp ) ? vec[j].p2 : vec[j].p1;
      Vector e1 = ( I - cp ) / abs( I - cp );
      Vector e2 = ( J - cp ) / abs( J - cp );
      Line tmp = calcLine(vec[i],vec[j],cp+e1*100,cp+e2*100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i],vec[j],cp+e1*100,cp-e2*100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if( candidateLines.size() >= 4 ) break;
  }
     
  vector<Point> candidatePoints;
   
  rep(i,candidateLines.size()) REP(j,i+1,candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if( equals(cross(line1.p1-line1.p2,line2.p1-line2.p2),0.0) ) continue;
    Point cp = crosspoint(line1,line2);    
    candidatePoints.push_back(cp);
  }
   
  vector<Point> &v = candidatePoints;
  sort(v.begin(),v.end());
  v.erase(unique(v.begin(),v.end()),v.end());
   
  vector<Point> answer;
  rep(i,candidatePoints.size()){
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j,vec.size()){
      double tmp = distanceLP(vec[j],p);
      if( equals(dist,-1) ) dist = tmp;
      else if( !equals(dist,tmp) ) { success = false; /*break;*/ }
    }
    if( success ) answer.push_back(p);
    if( answer.size() >= 2 ) break;
  }
   
  if( answer.size() == 1 ) printf("%.10f %.10f\n",answer[0].x,answer[0].y);
  else if( answer.empty() ) cout << NONE << endl;
  else cout << MANY << endl;
}
   
int main(){
  int n;
  while( cin >> n, n ){  
    vector<Line> vec(n);
    rep(i,n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 190
memory_kb: 2056
final_rank: 5

code_snippet: #include<bits/stdc++.h>
  
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-6)
#define equals(a,b) (fabs((a)-(b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1 
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
  
using namespace std;
  
class Point{
public:
  double x,y;
  
  Point(double x = 0,double y = 0): x(x),y(y){}
  
  Point operator + (Point p){return Point(x+p.x,y+p.y);}
  Point operator - (Point p){return Point(x-p.x,y-p.y);}
  Point operator * (double a){return Point(a*x,a*y);}
  Point operator / (double a){return Point(x/a,y/a);}
  Point operator * (Point a){ return Point(x * a.x - y * a.y, x * a.y + y * a.x); }
  
  bool operator < (const Point& p) const{ return !equals(x,p.x)?x<p.x:(!equals(y,p.y)&&y<p.y); }
  
  bool operator == (const Point& p)const{ return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS; }
  
};
  
struct Segment{
  Point p1,p2;
  int index;
  Segment(Point p1 = Point(),Point p2 = Point(),int index=-1):p1(p1),p2(p2),index(index){}
  bool operator <  (const Segment& s) const { return ( p2 == s.p2 ) ? p1 < s.p1 : p2 < s.p2; }
  bool operator == (const Segment& s) const { return ( s.p1 == p1 && s.p2 == p2 ) || ( s.p1 == p2 && s.p2 == p1 ); }
  
};
  
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
  
double dot(Point a,Point b){ return a.x*b.x + a.y*b.y; }
  
double cross(Point a,Point b){ return a.x*b.y - a.y*b.x; }
  
double norm(Point a){ return a.x*a.x+a.y*a.y; }
  
double abs(Point a){ return sqrt(norm(a)); }
  
Point rotate(Point a,double rad){ return Point(cos(rad)*a.x - sin(rad)*a.y,sin(rad)*a.x + cos(rad)*a.y); }
  
double toRad(double agl){ return agl*M_PI/180.0; }
  
double getArg(Point a,Point b,Point c){
  double arg1 = atan2(b.y-a.y,b.x-a.x);
  double arg2 = atan2(c.y-b.y,c.x-b.x);
  double arg = fabs( arg1 - arg2 );
  while( arg > M_PI ) arg -= 2.0 * M_PI;
  return fabs(arg);
}
  
int ccw(Point p0,Point p1,Point p2){
  Point a = p1-p0;
  Point b = p2-p0;
  if(cross(a,b) > EPS)return COUNTER_CLOCKWISE;
  if(cross(a,b) < -EPS)return CLOCKWISE;
  if(dot(a,b) < -EPS)return ONLINE_BACK;
  if(norm(a) < norm(b))return ONLINE_FRONT;
  return ON_SEGMENT;
}
  
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2-l.p1, m.p2-m.p1)) > EPS || // non-parallel
         abs(cross(l.p2-l.p1, m.p1-l.p1)) < EPS;   // same line
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2-l.p1, s.p1-l.p1)*       // s[0] is left of l
         cross(l.p2-l.p1, s.p2-l.p1) < EPS; // s[1] is right of l
}
bool intersectLP(Line l,Point p) {
  return abs(cross(l.p2-p, l.p1-p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1,s.p2,t.p1)*ccw(s.p1,s.p2,t.p2) <= 0 &&
         ccw(t.p1,t.p2,s.p1)*ccw(t.p1,t.p2,s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1-p)+abs(s.p2-p)-abs(s.p2-s.p1) < EPS; // triangle inequality
}
  
Point projection(Line l,Point p) {
  double t = dot(p-l.p1, l.p1-l.p2) / norm(l.p1-l.p2);
  return l.p1 + (l.p1-l.p2)*t;
}
Point reflection(Line l,Point p) {
  return p + (projection(l, p) - p) * 2;
}
double distanceLP(Line l, Point p) {
  return abs(p - projection(l, p));
}
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
  
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
  
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
  
Point crosspoint(Line l,Line m){
  double A = cross(l.p2-l.p1,m.p2-m.p1);
  double B = cross(l.p2-l.p1,l.p2-m.p1);
  if(abs(A) < EPS && abs(B) < EPS){
    vector<Point> vec;
    vec.push_back(l.p1),vec.push_back(l.p2),vec.push_back(m.p1),vec.push_back(m.p2);
    sort(vec.begin(),vec.end());
    assert(vec[1] == vec[2]); 
    return vec[1];
  }
  if(abs(A) < EPS)assert(false);
  return m.p1 + (m.p2-m.p1)*(B/A);
}
  
double cross3p(Point p,Point q,Point r) { return (r.x-q.x) * (p.y -q.y) - (r.y - q.y) * (p.x - q.x); }
    
bool collinear(Point p,Point q,Point r) { return fabs(cross3p(p,q,r)) < EPS; }
    
bool ccwtest(Point p,Point q,Point r){ return cross3p(p,q,r) > 0; }
   
bool onSegment(Point p,Point q,Point r){
  return collinear(p,q,r) && equals(sqrt(pow(p.x-r.x,2)+pow(p.y-r.y,2)) + sqrt(pow(r.x-q.x,2) + pow(r.y-q.y,2) ),sqrt(pow(p.x-q.x,2)+pow(p.y-q.y,2)) ) ;
}
  
// ------------------
  
Line calcLine(Line line1,Line line2,Point p1,Point p2){

  Point cp = crosspoint(line1,line2);
  int res = ccw(cp,p1,p2);

  Point base;
  if( res == COUNTER_CLOCKWISE ) base = p1;
  else                           base = p2;
  Point not_base = (base==p1)?p2:p1;
  double arg_a = (toRad(180.0)-getArg(base,cp,not_base));

  Vector e = ( base - cp ) / abs( base - cp );
  e = rotate(e,arg_a/2.0);
  Line tmp = Line(cp,cp+e*100);
  return tmp;
}
  
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec){
  
  if( vec.size() <= 2 ) { cout << MANY << endl; return; }
  
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i,n) REP(j,i+1,n){
    if( equals(cross(vec[i].p1-vec[i].p2,vec[j].p1-vec[j].p2),0.0) ) {
      Vector e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      e = rotate(e,toRad(90));
      Line line = Line(vec[i].p1,vec[i].p1+e*100);
      Point cp1 = crosspoint(line,vec[i]);
      Point cp2 = crosspoint(line,vec[j]);
      Point mp = ( cp1 + cp2 ) / 2.0;
      e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      line = Line(mp,mp+e*100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i],vec[j]);
      Point I = ( vec[i].p1 == cp ) ? vec[i].p2 : vec[i].p1;
      Point J = ( vec[j].p1 == cp ) ? vec[j].p2 : vec[j].p1;
      Vector e1 = ( I - cp ) / abs( I - cp );
      Vector e2 = ( J - cp ) / abs( J - cp );
      Line tmp = calcLine(vec[i],vec[j],cp+e1*100,cp+e2*100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i],vec[j],cp+e1*100,cp-e2*100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if( candidateLines.size() >= 8 ) break;
  }
    
  vector<Point> candidatePoints;
  
  rep(i,candidateLines.size()) REP(j,i+1,candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if( equals(cross(line1.p1-line1.p2,line2.p1-line2.p2),0.0) ) continue;
    Point cp = crosspoint(line1,line2);    
    candidatePoints.push_back(cp);
  }
  
  vector<Point> &v = candidatePoints;
  sort(v.begin(),v.end());
  v.erase(unique(v.begin(),v.end()),v.end());
  
  vector<Point> answer;
  rep(i,candidatePoints.size()){
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j,vec.size()){
      double tmp = distanceLP(vec[j],p);
      if( equals(dist,-1) ) dist = tmp;
      else if( !equals(dist,tmp) ) { success = false; break; }
    }
    if( success ) answer.push_back(p);
    if( answer.size() >= 2 ) break;
  }
  
  if( answer.size() == 1 ) printf("%.10f %.10f\n",answer[0].x,answer[0].y);
  else if( answer.empty() ) cout << NONE << endl;
  else cout << MANY << endl;
}
  
int main(){
  int n;
  while( cin >> n, n ){  
    vector<Line> vec(n);
    rep(i,n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 2056
final_rank: 3

code_snippet: #include<bits/stdc++.h>
  
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-6)
#define equals(a,b) (fabs((a)-(b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1 
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
  
using namespace std;
  
class Point{
public:
  double x,y;
  
  Point(double x = 0,double y = 0): x(x),y(y){}
  
  Point operator + (Point p){return Point(x+p.x,y+p.y);}
  Point operator - (Point p){return Point(x-p.x,y-p.y);}
  Point operator * (double a){return Point(a*x,a*y);}
  Point operator / (double a){return Point(x/a,y/a);}
  Point operator * (Point a){ return Point(x * a.x - y * a.y, x * a.y + y * a.x); }
  
  bool operator < (const Point& p) const{ return !equals(x,p.x)?x<p.x:(!equals(y,p.y)&&y<p.y); }
  
  bool operator == (const Point& p)const{ return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS; }
  
};
  
struct Segment{
  Point p1,p2;
  int index;
  Segment(Point p1 = Point(),Point p2 = Point(),int index=-1):p1(p1),p2(p2),index(index){}
  bool operator <  (const Segment& s) const { return ( p2 == s.p2 ) ? p1 < s.p1 : p2 < s.p2; }
  bool operator == (const Segment& s) const { return ( s.p1 == p1 && s.p2 == p2 ) || ( s.p1 == p2 && s.p2 == p1 ); }
  
};
  
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
  
double dot(Point a,Point b){ return a.x*b.x + a.y*b.y; }
  
double cross(Point a,Point b){ return a.x*b.y - a.y*b.x; }
  
double norm(Point a){ return a.x*a.x+a.y*a.y; }
  
double abs(Point a){ return sqrt(norm(a)); }
  
Point rotate(Point a,double rad){ return Point(cos(rad)*a.x - sin(rad)*a.y,sin(rad)*a.x + cos(rad)*a.y); }
  
double toRad(double agl){ return agl*M_PI/180.0; }
  
double getArg(Point a,Point b,Point c){
  double arg1 = atan2(b.y-a.y,b.x-a.x);
  double arg2 = atan2(c.y-b.y,c.x-b.x);
  double arg = fabs( arg1 - arg2 );
  while( arg > M_PI ) arg -= 2.0 * M_PI;
  return fabs(arg);
}
  
int ccw(Point p0,Point p1,Point p2){
  Point a = p1-p0;
  Point b = p2-p0;
  if(cross(a,b) > EPS)return COUNTER_CLOCKWISE;
  if(cross(a,b) < -EPS)return CLOCKWISE;
  if(dot(a,b) < -EPS)return ONLINE_BACK;
  if(norm(a) < norm(b))return ONLINE_FRONT;
  return ON_SEGMENT;
}
  
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2-l.p1, m.p2-m.p1)) > EPS || // non-parallel
         abs(cross(l.p2-l.p1, m.p1-l.p1)) < EPS;   // same line
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2-l.p1, s.p1-l.p1)*       // s[0] is left of l
         cross(l.p2-l.p1, s.p2-l.p1) < EPS; // s[1] is right of l
}
bool intersectLP(Line l,Point p) {
  return abs(cross(l.p2-p, l.p1-p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1,s.p2,t.p1)*ccw(s.p1,s.p2,t.p2) <= 0 &&
         ccw(t.p1,t.p2,s.p1)*ccw(t.p1,t.p2,s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1-p)+abs(s.p2-p)-abs(s.p2-s.p1) < EPS; // triangle inequality
}
  
Point projection(Line l,Point p) {
  double t = dot(p-l.p1, l.p1-l.p2) / norm(l.p1-l.p2);
  return l.p1 + (l.p1-l.p2)*t;
}
Point reflection(Line l,Point p) {
  return p + (projection(l, p) - p) * 2;
}
double distanceLP(Line l, Point p) {
  return abs(p - projection(l, p));
}
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
  
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
  
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
  
Point crosspoint(Line l,Line m){
  double A = cross(l.p2-l.p1,m.p2-m.p1);
  double B = cross(l.p2-l.p1,l.p2-m.p1);
  if(abs(A) < EPS && abs(B) < EPS){
    vector<Point> vec;
    vec.push_back(l.p1),vec.push_back(l.p2),vec.push_back(m.p1),vec.push_back(m.p2);
    sort(vec.begin(),vec.end());
    assert(vec[1] == vec[2]); 
    return vec[1];
  }
  if(abs(A) < EPS)assert(false);
  return m.p1 + (m.p2-m.p1)*(B/A);
}
  
double cross3p(Point p,Point q,Point r) { return (r.x-q.x) * (p.y -q.y) - (r.y - q.y) * (p.x - q.x); }
    
bool collinear(Point p,Point q,Point r) { return fabs(cross3p(p,q,r)) < EPS; }
    
bool ccwtest(Point p,Point q,Point r){ return cross3p(p,q,r) > 0; }
   
bool onSegment(Point p,Point q,Point r){
  return collinear(p,q,r) && equals(sqrt(pow(p.x-r.x,2)+pow(p.y-r.y,2)) + sqrt(pow(r.x-q.x,2) + pow(r.y-q.y,2) ),sqrt(pow(p.x-q.x,2)+pow(p.y-q.y,2)) ) ;
}
  
// ------------------
  
Line calcLine(Line line1,Line line2,Point p1,Point p2){

  Point cp = crosspoint(line1,line2);
  int res = ccw(cp,p1,p2);

  Point base;
  if( res == COUNTER_CLOCKWISE ) base = p1;
  else                           base = p2;
  Point not_base = (base==p1)?p2:p1;
  double arg_a = (toRad(180.0)-getArg(base,cp,not_base));

  Vector e = ( base - cp ) / abs( base - cp );
  e = rotate(e,arg_a/2.0);
  Line tmp = Line(cp,cp+e*100);
  return tmp;
}
  
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec){
  
  if( vec.size() <= 2 ) { cout << MANY << endl; return; }
  
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i,n) REP(j,i+1,n){
    if( equals(cross(vec[i].p1-vec[i].p2,vec[j].p1-vec[j].p2),0.0) ) {
      Vector e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      e = rotate(e,toRad(90));
      Line line = Line(vec[i].p1,vec[i].p1+e*100);
      Point cp1 = crosspoint(line,vec[i]);
      Point cp2 = crosspoint(line,vec[j]);
      Point mp = ( cp1 + cp2 ) / 2.0;
      e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      line = Line(mp,mp+e*100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i],vec[j]);
      Point I = ( vec[i].p1 == cp ) ? vec[i].p2 : vec[i].p1;
      Point J = ( vec[j].p1 == cp ) ? vec[j].p2 : vec[j].p1;
      Vector e1 = ( I - cp ) / abs( I - cp );
      Vector e2 = ( J - cp ) / abs( J - cp );
      Line tmp = calcLine(vec[i],vec[j],cp+e1*100,cp+e2*100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i],vec[j],cp+e1*100,cp-e2*100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if( candidateLines.size() >= 20 ) break;
  }
    
  vector<Point> candidatePoints;
  
  rep(i,candidateLines.size()) REP(j,i+1,candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if( equals(cross(line1.p1-line1.p2,line2.p1-line2.p2),0.0) ) continue;
    Point cp = crosspoint(line1,line2);    
    candidatePoints.push_back(cp);
  }
  
  vector<Point> &v = candidatePoints;
  sort(v.begin(),v.end());
  v.erase(unique(v.begin(),v.end()),v.end());
  
  vector<Point> answer;
  rep(i,candidatePoints.size()){
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j,vec.size()){
      double tmp = distanceLP(vec[j],p);
      if( equals(dist,-1) ) dist = tmp;
      else if( !equals(dist,tmp) ) { success = false; break; }
    }
    if( success ) answer.push_back(p);
    if( answer.size() >= 2 ) break;
  }
  
  if( answer.size() == 1 ) printf("%.10f %.10f\n",answer[0].x,answer[0].y);
  else if( answer.empty() ) cout << NONE << endl;
  else cout << MANY << endl;
}
  
int main(){
  int n;
  while( cin >> n, n ){  
    vector<Line> vec(n);
    rep(i,n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 2056
final_rank: 3

code_snippet: #include<bits/stdc++.h>
  
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-6)
#define equals(a,b) (fabs((a)-(b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1 
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
  
using namespace std;
  
class Point{
public:
  double x,y;
  
  Point(double x = 0,double y = 0): x(x),y(y){}
  
  Point operator + (Point p){return Point(x+p.x,y+p.y);}
  Point operator - (Point p){return Point(x-p.x,y-p.y);}
  Point operator * (double a){return Point(a*x,a*y);}
  Point operator / (double a){return Point(x/a,y/a);}
  Point operator * (Point a){ return Point(x * a.x - y * a.y, x * a.y + y * a.x); }
  
  bool operator < (const Point& p) const{ return !equals(x,p.x)?x<p.x:(!equals(y,p.y)&&y<p.y); }
  
  bool operator == (const Point& p)const{ return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS; }
  
};
  
struct Segment{
  Point p1,p2;
  int index;
  Segment(Point p1 = Point(),Point p2 = Point(),int index=-1):p1(p1),p2(p2),index(index){}
  bool operator <  (const Segment& s) const { return ( p2 == s.p2 ) ? p1 < s.p1 : p2 < s.p2; }
  bool operator == (const Segment& s) const { return ( s.p1 == p1 && s.p2 == p2 ) || ( s.p1 == p2 && s.p2 == p1 ); }
  
};
  
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
  
double dot(Point a,Point b){ return a.x*b.x + a.y*b.y; }
  
double cross(Point a,Point b){ return a.x*b.y - a.y*b.x; }
  
double norm(Point a){ return a.x*a.x+a.y*a.y; }
  
double abs(Point a){ return sqrt(norm(a)); }
  
Point rotate(Point a,double rad){ return Point(cos(rad)*a.x - sin(rad)*a.y,sin(rad)*a.x + cos(rad)*a.y); }
  
double toRad(double agl){ return agl*M_PI/180.0; }
  
double getArg(Point a,Point b,Point c){
  double arg1 = atan2(b.y-a.y,b.x-a.x);
  double arg2 = atan2(c.y-b.y,c.x-b.x);
  double arg = fabs( arg1 - arg2 );
  while( arg > M_PI ) arg -= 2.0 * M_PI;
  return fabs(arg);
}
  
int ccw(Point p0,Point p1,Point p2){
  Point a = p1-p0;
  Point b = p2-p0;
  if(cross(a,b) > EPS)return COUNTER_CLOCKWISE;
  if(cross(a,b) < -EPS)return CLOCKWISE;
  if(dot(a,b) < -EPS)return ONLINE_BACK;
  if(norm(a) < norm(b))return ONLINE_FRONT;
  return ON_SEGMENT;
}
  
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2-l.p1, m.p2-m.p1)) > EPS || // non-parallel
         abs(cross(l.p2-l.p1, m.p1-l.p1)) < EPS;   // same line
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2-l.p1, s.p1-l.p1)*       // s[0] is left of l
         cross(l.p2-l.p1, s.p2-l.p1) < EPS; // s[1] is right of l
}
bool intersectLP(Line l,Point p) {
  return abs(cross(l.p2-p, l.p1-p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1,s.p2,t.p1)*ccw(s.p1,s.p2,t.p2) <= 0 &&
         ccw(t.p1,t.p2,s.p1)*ccw(t.p1,t.p2,s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1-p)+abs(s.p2-p)-abs(s.p2-s.p1) < EPS; // triangle inequality
}
  
Point projection(Line l,Point p) {
  double t = dot(p-l.p1, l.p1-l.p2) / norm(l.p1-l.p2);
  return l.p1 + (l.p1-l.p2)*t;
}
Point reflection(Line l,Point p) {
  return p + (projection(l, p) - p) * 2;
}
double distanceLP(Line l, Point p) {
  return abs(p - projection(l, p));
}
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
  
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
  
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
  
Point crosspoint(Line l,Line m){
  double A = cross(l.p2-l.p1,m.p2-m.p1);
  double B = cross(l.p2-l.p1,l.p2-m.p1);
  if(abs(A) < EPS && abs(B) < EPS){
    vector<Point> vec;
    vec.push_back(l.p1),vec.push_back(l.p2),vec.push_back(m.p1),vec.push_back(m.p2);
    sort(vec.begin(),vec.end());
    assert(vec[1] == vec[2]); 
    return vec[1];
  }
  if(abs(A) < EPS)assert(false);
  return m.p1 + (m.p2-m.p1)*(B/A);
}
  
double cross3p(Point p,Point q,Point r) { return (r.x-q.x) * (p.y -q.y) - (r.y - q.y) * (p.x - q.x); }
    
bool collinear(Point p,Point q,Point r) { return fabs(cross3p(p,q,r)) < EPS; }
    
bool ccwtest(Point p,Point q,Point r){ return cross3p(p,q,r) > 0; }
   
bool onSegment(Point p,Point q,Point r){
  return collinear(p,q,r) && equals(sqrt(pow(p.x-r.x,2)+pow(p.y-r.y,2)) + sqrt(pow(r.x-q.x,2) + pow(r.y-q.y,2) ),sqrt(pow(p.x-q.x,2)+pow(p.y-q.y,2)) ) ;
}
  
// ------------------
  
Line calcLine(Line line1,Line line2,Point p1,Point p2){

  Point cp = crosspoint(line1,line2);
  int res = ccw(cp,p1,p2);

  Point base;
  if( res == COUNTER_CLOCKWISE ) base = p1;
  else                           base = p2;
  Point not_base = (base==p1)?p2:p1;
  double arg_a = (toRad(180.0)-getArg(base,cp,not_base));

  Vector e = ( base - cp ) / abs( base - cp );
  e = rotate(e,arg_a/2.0);
  Line tmp = Line(cp,cp+e*100);
  return tmp;
}
  
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec){
  
  if( vec.size() <= 2 ) { cout << MANY << endl; return; }
  
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i,n) REP(j,i+1,n){
    if( equals(cross(vec[i].p1-vec[i].p2,vec[j].p1-vec[j].p2),0.0) ) {
      Vector e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      e = rotate(e,toRad(90));
      Line line = Line(vec[i].p1,vec[i].p1+e*100);
      Point cp1 = crosspoint(line,vec[i]);
      Point cp2 = crosspoint(line,vec[j]);
      Point mp = ( cp1 + cp2 ) / 2.0;
      e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      line = Line(mp,mp+e*100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i],vec[j]);
      Point I = ( vec[i].p1 == cp ) ? vec[i].p2 : vec[i].p1;
      Point J = ( vec[j].p1 == cp ) ? vec[j].p2 : vec[j].p1;
      Vector e1 = ( I - cp ) / abs( I - cp );
      Vector e2 = ( J - cp ) / abs( J - cp );
      Line tmp = calcLine(vec[i],vec[j],cp+e1*100,cp+e2*100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i],vec[j],cp+e1*100,cp-e2*100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if( candidateLines.size() >= 10 ) break;
  }
    
  vector<Point> candidatePoints;
  
  rep(i,candidateLines.size()) REP(j,i+1,candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if( equals(cross(line1.p1-line1.p2,line2.p1-line2.p2),0.0) ) continue;
    Point cp = crosspoint(line1,line2);    
    candidatePoints.push_back(cp);
  }
  
  vector<Point> &v = candidatePoints;
  sort(v.begin(),v.end());
  v.erase(unique(v.begin(),v.end()),v.end());
  
  vector<Point> answer;
  rep(i,candidatePoints.size()){
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j,vec.size()){
      double tmp = distanceLP(vec[j],p);
      if( equals(dist,-1) ) dist = tmp;
      else if( !equals(dist,tmp) ) { success = false; /*break;*/ }
    }
    if( success ) answer.push_back(p);
    if( answer.size() >= 2 ) break;
  }
  
  if( answer.size() == 1 ) printf("%.10f %.10f\n",answer[0].x,answer[0].y);
  else if( answer.empty() ) cout << NONE << endl;
  else cout << MANY << endl;
}
  
int main(){
  int n;
  while( cin >> n, n ){  
    vector<Line> vec(n);
    rep(i,n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 200
memory_kb: 2056
final_rank: 6

code_snippet: #include<bits/stdc++.h>
  
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-6)
#define equals(a,b) (fabs((a)-(b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1 
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
  
using namespace std;
  
class Point{
public:
  double x,y;
  
  Point(double x = 0,double y = 0): x(x),y(y){}
  
  Point operator + (Point p){return Point(x+p.x,y+p.y);}
  Point operator - (Point p){return Point(x-p.x,y-p.y);}
  Point operator * (double a){return Point(a*x,a*y);}
  Point operator / (double a){return Point(x/a,y/a);}
  Point operator * (Point a){ return Point(x * a.x - y * a.y, x * a.y + y * a.x); }
  
  bool operator < (const Point& p) const{ return !equals(x,p.x)?x<p.x:(!equals(y,p.y)&&y<p.y); }
  
  bool operator == (const Point& p)const{ return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS; }
  
};
  
struct Segment{
  Point p1,p2;
  int index;
  Segment(Point p1 = Point(),Point p2 = Point(),int index=-1):p1(p1),p2(p2),index(index){}
  bool operator <  (const Segment& s) const { return ( p2 == s.p2 ) ? p1 < s.p1 : p2 < s.p2; }
  bool operator == (const Segment& s) const { return ( s.p1 == p1 && s.p2 == p2 ) || ( s.p1 == p2 && s.p2 == p1 ); }
  
};
  
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
  
double dot(Point a,Point b){ return a.x*b.x + a.y*b.y; }
  
double cross(Point a,Point b){ return a.x*b.y - a.y*b.x; }
  
double norm(Point a){ return a.x*a.x+a.y*a.y; }
  
double abs(Point a){ return sqrt(norm(a)); }
  
Point rotate(Point a,double rad){ return Point(cos(rad)*a.x - sin(rad)*a.y,sin(rad)*a.x + cos(rad)*a.y); }
  
double toRad(double agl){ return agl*M_PI/180.0; }
  
double getArg(Point a,Point b,Point c){
  double arg1 = atan2(b.y-a.y,b.x-a.x);
  double arg2 = atan2(c.y-b.y,c.x-b.x);
  double arg = fabs( arg1 - arg2 );
  while( arg > M_PI ) arg -= 2.0 * M_PI;
  return fabs(arg);
}
  
int ccw(Point p0,Point p1,Point p2){
  Point a = p1-p0;
  Point b = p2-p0;
  if(cross(a,b) > EPS)return COUNTER_CLOCKWISE;
  if(cross(a,b) < -EPS)return CLOCKWISE;
  if(dot(a,b) < -EPS)return ONLINE_BACK;
  if(norm(a) < norm(b))return ONLINE_FRONT;
  return ON_SEGMENT;
}
  
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2-l.p1, m.p2-m.p1)) > EPS || // non-parallel
         abs(cross(l.p2-l.p1, m.p1-l.p1)) < EPS;   // same line
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2-l.p1, s.p1-l.p1)*       // s[0] is left of l
         cross(l.p2-l.p1, s.p2-l.p1) < EPS; // s[1] is right of l
}
bool intersectLP(Line l,Point p) {
  return abs(cross(l.p2-p, l.p1-p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1,s.p2,t.p1)*ccw(s.p1,s.p2,t.p2) <= 0 &&
         ccw(t.p1,t.p2,s.p1)*ccw(t.p1,t.p2,s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1-p)+abs(s.p2-p)-abs(s.p2-s.p1) < EPS; // triangle inequality
}
  
Point projection(Line l,Point p) {
  double t = dot(p-l.p1, l.p1-l.p2) / norm(l.p1-l.p2);
  return l.p1 + (l.p1-l.p2)*t;
}
Point reflection(Line l,Point p) {
  return p + (projection(l, p) - p) * 2;
}
double distanceLP(Line l, Point p) {
  return abs(p - projection(l, p));
}
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
  
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
  
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
  
Point crosspoint(Line l,Line m){
  double A = cross(l.p2-l.p1,m.p2-m.p1);
  double B = cross(l.p2-l.p1,l.p2-m.p1);
  if(abs(A) < EPS && abs(B) < EPS){
    vector<Point> vec;
    vec.push_back(l.p1),vec.push_back(l.p2),vec.push_back(m.p1),vec.push_back(m.p2);
    sort(vec.begin(),vec.end());
    assert(vec[1] == vec[2]); 
    return vec[1];
  }
  if(abs(A) < EPS)assert(false);
  return m.p1 + (m.p2-m.p1)*(B/A);
}
  
double cross3p(Point p,Point q,Point r) { return (r.x-q.x) * (p.y -q.y) - (r.y - q.y) * (p.x - q.x); }
    
bool collinear(Point p,Point q,Point r) { return fabs(cross3p(p,q,r)) < EPS; }
    
bool ccwtest(Point p,Point q,Point r){ return cross3p(p,q,r) > 0; }
   
bool onSegment(Point p,Point q,Point r){
  return collinear(p,q,r) && equals(sqrt(pow(p.x-r.x,2)+pow(p.y-r.y,2)) + sqrt(pow(r.x-q.x,2) + pow(r.y-q.y,2) ),sqrt(pow(p.x-q.x,2)+pow(p.y-q.y,2)) ) ;
}
  
// ------------------
  
Line calcLine(Line line1,Line line2,Point p1,Point p2){

  Point cp = crosspoint(line1,line2);
  int res = ccw(cp,p1,p2);

  Point base;
  if( res == COUNTER_CLOCKWISE ) base = p1;
  else                           base = p2;
  Point not_base = (base==p1)?p2:p1;
  double arg_a = (toRad(180.0)-getArg(base,cp,not_base));

  Vector e = ( base - cp ) / abs( base - cp );
  e = rotate(e,arg_a/2.0);
  Line tmp = Line(cp,cp+e*100);
  return tmp;
}
  
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec){
  
  if( vec.size() <= 2 ) { cout << MANY << endl; return; }
  
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i,n) REP(j,i+1,n){
    if( equals(cross(vec[i].p1-vec[i].p2,vec[j].p1-vec[j].p2),0.0) ) {
      Vector e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      e = rotate(e,toRad(90));
      Line line = Line(vec[i].p1,vec[i].p1+e*100);
      Point cp1 = crosspoint(line,vec[i]);
      Point cp2 = crosspoint(line,vec[j]);
      Point mp = ( cp1 + cp2 ) / 2.0;
      e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      line = Line(mp,mp+e*100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i],vec[j]);
      Point I = ( vec[i].p1 == cp ) ? vec[i].p2 : vec[i].p1;
      Point J = ( vec[j].p1 == cp ) ? vec[j].p2 : vec[j].p1;
      Vector e1 = ( I - cp ) / abs( I - cp );
      Vector e2 = ( J - cp ) / abs( J - cp );
      Line tmp = calcLine(vec[i],vec[j],cp+e1*100,cp+e2*100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i],vec[j],cp+e1*100,cp-e2*100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if( candidateLines.size() >= 20 ) break;
  }
    
  vector<Point> candidatePoints;
  
  rep(i,candidateLines.size()) REP(j,i+1,candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if( equals(cross(line1.p1-line1.p2,line2.p1-line2.p2),0.0) ) continue;
    Point cp = crosspoint(line1,line2);    
    candidatePoints.push_back(cp);
  }
  
  vector<Point> &v = candidatePoints;
  sort(v.begin(),v.end());
  v.erase(unique(v.begin(),v.end()),v.end());
  
  vector<Point> answer;
  rep(i,candidatePoints.size()){
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j,vec.size()){
      double tmp = distanceLP(vec[j],p);
      if( equals(dist,-1) ) dist = tmp;
      else if( !equals(dist,tmp) ) { success = false; /*break;*/ }
    }
    if( success ) answer.push_back(p);
    if( answer.size() >= 2 ) break;
  }
  
  if( answer.size() == 1 ) printf("%.10f %.10f\n",answer[0].x,answer[0].y);
  else if( answer.empty() ) cout << NONE << endl;
  else cout << MANY << endl;
}
  
int main(){
  int n;
  while( cin >> n, n ){  
    vector<Line> vec(n);
    rep(i,n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 220
memory_kb: 2056
final_rank: 7

code_snippet: #include<bits/stdc++.h>
  
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-6)
#define equals(a,b) (fabs((a)-(b)) < EPS)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1 
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
  
using namespace std;
  
class Point{
public:
  double x,y;
  
  Point(double x = 0,double y = 0): x(x),y(y){}
  
  Point operator + (Point p){return Point(x+p.x,y+p.y);}
  Point operator - (Point p){return Point(x-p.x,y-p.y);}
  Point operator * (double a){return Point(a*x,a*y);}
  Point operator / (double a){return Point(x/a,y/a);}
  Point operator * (Point a){ return Point(x * a.x - y * a.y, x * a.y + y * a.x); }
  
  bool operator < (const Point& p) const{ return !equals(x,p.x)?x<p.x:(!equals(y,p.y)&&y<p.y); }
  
  bool operator == (const Point& p)const{ return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS; }
  
};
  
struct Segment{
  Point p1,p2;
  int index;
  Segment(Point p1 = Point(),Point p2 = Point(),int index=-1):p1(p1),p2(p2),index(index){}
  bool operator <  (const Segment& s) const { return ( p2 == s.p2 ) ? p1 < s.p1 : p2 < s.p2; }
  bool operator == (const Segment& s) const { return ( s.p1 == p1 && s.p2 == p2 ) || ( s.p1 == p2 && s.p2 == p1 ); }
  
};
  
typedef Point Vector;
typedef Segment Line;
typedef vector<Point> Polygon;
  
double dot(Point a,Point b){ return a.x*b.x + a.y*b.y; }
  
double cross(Point a,Point b){ return a.x*b.y - a.y*b.x; }
  
double norm(Point a){ return a.x*a.x+a.y*a.y; }
  
double abs(Point a){ return sqrt(norm(a)); }
  
Point rotate(Point a,double rad){ return Point(cos(rad)*a.x - sin(rad)*a.y,sin(rad)*a.x + cos(rad)*a.y); }
  
double toRad(double agl){ return agl*M_PI/180.0; }
  
double getArg(Point a,Point b,Point c){
  double arg1 = atan2(b.y-a.y,b.x-a.x);
  double arg2 = atan2(c.y-b.y,c.x-b.x);
  double arg = fabs( arg1 - arg2 );
  while( arg > M_PI ) arg -= 2.0 * M_PI;
  return fabs(arg);
}
  
int ccw(Point p0,Point p1,Point p2){
  Point a = p1-p0;
  Point b = p2-p0;
  if(cross(a,b) > EPS)return COUNTER_CLOCKWISE;
  if(cross(a,b) < -EPS)return CLOCKWISE;
  if(dot(a,b) < -EPS)return ONLINE_BACK;
  if(norm(a) < norm(b))return ONLINE_FRONT;
  return ON_SEGMENT;
}
  
bool intersectLL(Line l, Line m) {
  return abs(cross(l.p2-l.p1, m.p2-m.p1)) > EPS || // non-parallel
         abs(cross(l.p2-l.p1, m.p1-l.p1)) < EPS;   // same line
}
bool intersectLS(Line l, Line s) {
  return cross(l.p2-l.p1, s.p1-l.p1)*       // s[0] is left of l
         cross(l.p2-l.p1, s.p2-l.p1) < EPS; // s[1] is right of l
}
bool intersectLP(Line l,Point p) {
  return abs(cross(l.p2-p, l.p1-p)) < EPS;
}
bool intersectSS(Line s, Line t) {
  return ccw(s.p1,s.p2,t.p1)*ccw(s.p1,s.p2,t.p2) <= 0 &&
         ccw(t.p1,t.p2,s.p1)*ccw(t.p1,t.p2,s.p2) <= 0;
}
bool intersectSP(Line s, Point p) {
  return abs(s.p1-p)+abs(s.p2-p)-abs(s.p2-s.p1) < EPS; // triangle inequality
}
  
Point projection(Line l,Point p) {
  double t = dot(p-l.p1, l.p1-l.p2) / norm(l.p1-l.p2);
  return l.p1 + (l.p1-l.p2)*t;
}
Point reflection(Line l,Point p) {
  return p + (projection(l, p) - p) * 2;
}
double distanceLP(Line l, Point p) {
  return abs(p - projection(l, p));
}
double distanceLL(Line l, Line m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m.p1);
}
  
double distanceLS(Line l, Line s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s.p1), distanceLP(l, s.p2));
}
double distanceSP(Line s, Point p) {
  Point r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s.p1 - p), abs(s.p2 - p));
}
  
double distanceSS(Line s, Line t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t.p1), distanceSP(s, t.p2)),
             min(distanceSP(t, s.p1), distanceSP(t, s.p2)));
}
  
Point crosspoint(Line l,Line m){
  double A = cross(l.p2-l.p1,m.p2-m.p1);
  double B = cross(l.p2-l.p1,l.p2-m.p1);
  if(abs(A) < EPS && abs(B) < EPS){
    vector<Point> vec;
    vec.push_back(l.p1),vec.push_back(l.p2),vec.push_back(m.p1),vec.push_back(m.p2);
    sort(vec.begin(),vec.end());
    assert(vec[1] == vec[2]); 
    return vec[1];
  }
  if(abs(A) < EPS)assert(false);
  return m.p1 + (m.p2-m.p1)*(B/A);
}
  
double cross3p(Point p,Point q,Point r) { return (r.x-q.x) * (p.y -q.y) - (r.y - q.y) * (p.x - q.x); }
    
bool collinear(Point p,Point q,Point r) { return fabs(cross3p(p,q,r)) < EPS; }
    
bool ccwtest(Point p,Point q,Point r){ return cross3p(p,q,r) > 0; }
   
bool onSegment(Point p,Point q,Point r){
  return collinear(p,q,r) && equals(sqrt(pow(p.x-r.x,2)+pow(p.y-r.y,2)) + sqrt(pow(r.x-q.x,2) + pow(r.y-q.y,2) ),sqrt(pow(p.x-q.x,2)+pow(p.y-q.y,2)) ) ;
}
  
// ------------------
  
Line calcLine(Line line1,Line line2,Point p1,Point p2){

  Point cp = crosspoint(line1,line2);
  int res = ccw(cp,p1,p2);

  Point base;
  if( res == COUNTER_CLOCKWISE ) base = p1;
  else                           base = p2;
  Point not_base = (base==p1)?p2:p1;
  double arg_a = (toRad(180.0)-getArg(base,cp,not_base));

  Vector e = ( base - cp ) / abs( base - cp );
  e = rotate(e,arg_a/2.0);
  Line tmp = Line(cp,cp+e*100);
  return tmp;
}
  
const string MANY = "Many";
const string NONE = "None";
void compute(vector<Line> &vec){
  
  if( vec.size() <= 2 ) { cout << MANY << endl; return; }
  
  vector<Line> candidateLines;
  int n = vec.size();
  rep(i,n) REP(j,i+1,n){
    if( equals(cross(vec[i].p1-vec[i].p2,vec[j].p1-vec[j].p2),0.0) ) {
      Vector e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      e = rotate(e,toRad(90));
      Line line = Line(vec[i].p1,vec[i].p1+e*100);
      Point cp1 = crosspoint(line,vec[i]);
      Point cp2 = crosspoint(line,vec[j]);
      Point mp = ( cp1 + cp2 ) / 2.0;
      e = ( vec[i].p2 - vec[i].p1 ) / abs( vec[i].p2 - vec[i].p1 );
      line = Line(mp,mp+e*100);
      line.index = candidateLines.size();
      candidateLines.push_back(line);
    } else {
      Point cp = crosspoint(vec[i],vec[j]);
      Point I = ( vec[i].p1 == cp ) ? vec[i].p2 : vec[i].p1;
      Point J = ( vec[j].p1 == cp ) ? vec[j].p2 : vec[j].p1;
      Vector e1 = ( I - cp ) / abs( I - cp );
      Vector e2 = ( J - cp ) / abs( J - cp );
      Line tmp = calcLine(vec[i],vec[j],cp+e1*100,cp+e2*100);
      int Index = candidateLines.size();
      tmp.index = Index;
      candidateLines.push_back(tmp);
      tmp = calcLine(vec[i],vec[j],cp+e1*100,cp-e2*100);
      tmp.index = Index;
      candidateLines.push_back(tmp);
    }
    if( candidateLines.size() >= 30 ) break;
  }
    
  vector<Point> candidatePoints;
  
  rep(i,candidateLines.size()) REP(j,i+1,candidateLines.size()) {
    Line line1 = candidateLines[i];
    Line line2 = candidateLines[j];
    if( equals(cross(line1.p1-line1.p2,line2.p1-line2.p2),0.0) ) continue;
    Point cp = crosspoint(line1,line2);    
    candidatePoints.push_back(cp);
  }
  
  vector<Point> &v = candidatePoints;
  sort(v.begin(),v.end());
  v.erase(unique(v.begin(),v.end()),v.end());
  
  vector<Point> answer;
  rep(i,candidatePoints.size()){
    Point p = candidatePoints[i];
    double dist = -1;
    bool success = true;
    rep(j,vec.size()){
      double tmp = distanceLP(vec[j],p);
      if( equals(dist,-1) ) dist = tmp;
      else if( !equals(dist,tmp) ) { success = false; /*break;*/ }
    }
    if( success ) answer.push_back(p);
    if( answer.size() >= 2 ) break;
  }
  
  if( answer.size() == 1 ) printf("%.10f %.10f\n",answer[0].x,answer[0].y);
  else if( answer.empty() ) cout << NONE << endl;
  else cout << MANY << endl;
}
  
int main(){
  int n;
  while( cin >> n, n ){  
    vector<Line> vec(n);
    rep(i,n) cin >> vec[i].p1.x >> vec[i].p1.y >> vec[i].p2.x >> vec[i].p2.y;
    compute(vec);
  }
  return 0;
}
accuracy: 1
time_ms: 240
memory_kb: 2056
final_rank: 8