#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>

using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-9;
static const double PI = acos(-1.0);

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, s, n) for (int i = (s); i < (int)(n); i++)
#define FOREQ(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define FORIT(it, c) for (__typeof((c).begin())it = (c).begin(); it != (c).end(); it++)
#define MEMSET(v, h) memset((v), h, sizeof(v))

#include <complex>

typedef complex<double> Point;
typedef vector<Point> Polygon;

//static const double EPS = 1e-8;
static const double INF = 1e+10;

#define CURR(P, i) (P[i])
#define NEXT(P, i) (P[(i + 1) % P.size()])

struct Line : public vector<Point> {
  Line() {;}
  Line(Point a, Point b) { push_back(a); push_back(b); }
};

struct Circle {
  Point p;
  double r;
  Circle() {;}
  Circle(Point p, double r) : p(p), r(r) {;}
};


// usage:
// g++ -Wall -Dvisualize hoge.cpp
// ./a.out 2> data.js
// firefox Visualize.html
int zoom = 10;
#ifdef visualize
void ChangeColor(int r, int g, int b) {
  fprintf(stderr, "c.strokeStyle = 'rgb(%d, %d, %d)';\n", r, g, b);
}
void DrawPoint(const Point &p) {
  fprintf(stderr, "fillRect(%d, %d, %d, %d)\n",
      (int)(zoom*(p.real()-2)) + 1000, 1980-(int)(zoom*(p.imag() - 2)) - 1000,
      (int)(zoom*(p.real()+2)) + 1000, 1980-(int)(zoom*(p.imag() + 2)) - 1000);
}
void DrawLine(const Line &l) {
  fprintf(stderr, "line(%d, %d, %d, %d)\n",
      (int)(zoom*l[0].real()) + 1000, 1980-(int)(zoom*l[0].imag()) - 1000,
      (int)(zoom*l[1].real()) + 1000, 1980-(int)(zoom*l[1].imag()) - 1000);
}
void DrawPolygon(const Polygon &p) {
  const int n = p.size();
  for (int i = 0; i < n; i++) {
    DrawLine(Line(p[i], p[(i + 1) % n]));
  }
}
void DrawCircle(const Circle &c) {
  fprintf(stderr, "circle(%d, %d, %d)\n",
      (int)(zoom * c.p.real()) + 1000, 1980 - (int)(zoom * c.p.imag()) - 1000, (int)(zoom * c.r));
}
#else
void DrawPoint(const Point &p) {;}
void ChangeColor(int r, int g, int b) {;}
void DrawLine(Line l) {;}
void DrawPolygon(const Polygon &p) {;}
void DrawCircle(Circle c) {;}
#endif
//--------------------------------

namespace std {
  bool operator<(const Point &lhs, const Point &rhs) {
    return lhs.real() == rhs.real() ? lhs.imag() < rhs.imag() : lhs.real() < rhs.real();
  }
}

inline double cross(const Point &a, const Point &b) {
  return imag(conj(a) * b);
}

inline double dot(const Point &a, const Point &b) {
  return real(conj(a) * b);
}

inline int ccw(Point a, Point b, Point c) {
  b -= a;
  c -= a;
  if (cross(b, c) > 0) { return 1; }
  if (cross(b, c) < 0) { return -1; }
  if (dot(b, c) < 0) { return 2; }
  if (norm(b) < norm(c)) { return -2; }
  return 0;
}

enum { OUT, ON, IN };
int Contains(const Polygon& P, const Point& p) {
  bool in = false;
  for (int i = 0; i < (int)P.size(); ++i) {
    Point a = CURR(P,i) - p, b = NEXT(P,i) - p;
    if (imag(a) > imag(b)) swap(a, b);
    if (imag(a) <= 0 && 0 < imag(b))
      if (cross(a, b) < 0) in = !in;
    if (cross(a, b) == 0 && dot(a, b) <= 0) return ON;
  }
  return in ? IN : OUT;
}

Point mass(const Polygon &p) {
  const int n = p.size();
  double weight = 0.0;
  Point g = Point(0.0, 0.0);
  REP(i, n) {
    Point lg = (CURR(p, i) + NEXT(p, i)) / 3.0;
    double w = cross(CURR(p, i), NEXT(p, i));
    g += lg * w;
    weight += w;
  }
  Point ret = g / weight;
  return ret;
}


Polygon poly;
char str[1000];

int main(int argc, char *argv[]) {
  if (argc > 1) { zoom = atoi(argv[1]); }
  double x, y;
  while (scanf("%s %lf %lf", str, &x, &y), str[0] != 'e') {
    poly.clear();
    poly.push_back(Point(x, y));
    while (true) {
      scanf("%s", str);
      if (str[0] == 'a') {
        double r;
        scanf("%lf %lf %lf", &x, &y, &r);
        Point c = Point(x + poly.back().real(), y + poly.back().imag()) / 2.0;
        Point vect = Point(x - poly.back().real(), y - poly.back().imag());
        vect /= abs(vect);
        vect *= Point(0, 1);
        int s = r > 0 ? 1 : -1;
        double l = abs(c- Point(x, y));
        double d = sqrt(r * r - l * l);
        d *= -s;
        Point center = c + vect * d;
        double arg1 = arg(poly.back() - center);
        double arg2 = arg(Point(x, y) - center);
        //cout << center << endl;
        if (r < 0 && arg2 < arg1) { arg2 += 2 * PI; }
        if (r > 0 && arg2 > arg1) { arg2 -= 2 * PI; }
        for (double theta = arg1; min(arg1, arg2) <= theta && theta <= max(arg1, arg2); theta += 0.001 * -s) {
          Point p = center + Point(cos(theta), sin(theta)) * abs(r);
          poly.push_back(p);
        }
        poly.push_back(Point(x, y));
      } else if (str[0] == 'l') {
        scanf("%lf %lf", &x, &y);
        poly.push_back(Point(x, y));
      } else if (str[0] == 'c') {
        break;
      }
    }
    Point p = mass(poly);
    ChangeColor(0, 0, 0);
    DrawPolygon(poly);
    ChangeColor(255, 0, 0);
    DrawPoint(p);
    if (Contains(poly, p) == OUT) {
      printf("%.8f %.8f -\n", p.real(), p.imag());
    } else {
      printf("%.8f %.8f +\n", p.real(), p.imag());
    }
  }
}

Measured memory_bytes: 1564