#include <iostream>
#include <iomanip>
#include <complex>
#include <vector>
#include <algorithm>
#include <cmath>
#include <array>
using namespace std;
const double EPS = 1e-8;
const double INF = 1e12;
const double PI = acos(-1);
#define EQ(n,m) (abs((n)-(m)) < EPS)
#define X real()
#define Y imag()

typedef complex<double> P;
typedef vector<P> VP;
struct L : array<P, 2>{
    L(const P& a, const P& b){ at(0)=a; at(1)=b; }
    L(){}
};
struct C{
    P p;
    double r;
    C(const P& p, const double& r) : p(p), r(r) {}
    C(){}
};

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

double dot(P a, P b){
    return (conj(a)*b).X;
}
double cross(P a, P b){
    return (conj(a)*b).Y;
}
int ccw(P a, P b, P c){
    b -= a;
    c -= a;
    if(cross(b,c) > EPS) return +1; //ccw
    if(cross(b,c) < -EPS) return -1; //cw
    if(dot(b,c) < -EPS) return +2; //c-a-b
    if(abs(c)-abs(b) > EPS) return -2; //a-b-c
    return 0; //a-c-b
}

P unit(const P &p){
    return p/abs(p);
}
P rotate(const P &p, double rad){
    return p *P(cos(rad), sin(rad));
}

bool intersectSP(const L& s, const P &p){
    return abs(cross(s[0]-p, s[1]-p))<EPS  && dot(s[0]-p, s[1]-p)<EPS;
}

VP crosspointCC(C a, C b){
    VP ret;
    if(a.r < b.r) swap(a,b);
    double dist = abs(b.p-a.p);
    P dir = a.r*unit(b.p-a.p);
    if(EQ(dist, a.r+b.r) || EQ(dist, a.r-b.r)){
        ret.push_back(a.p +dir);
    }else if(a.r-b.r < dist && dist < a.r+b.r){
        double cos = (a.r*a.r +dist*dist -b.r*b.r)/(2*a.r*dist);
        double sin = sqrt(1 -cos*cos);
        ret.push_back(a.p +dir*P(cos, sin));
        ret.push_back(a.p +dir*P(cos, -sin));
    }
    return ret;
}

P centroid(VP &poly){
    int n = poly.size();
    P ret = P(0, 0);
    double total = 0;
    for(int i=0; i<n; i++){
        P &curr = poly[i], &next = poly[(i+1)%n];
        ret += (curr +next) *cross(curr, next);
        total += cross(curr, next);
    }
    return ret /total /3.0;
}

int in_poly(const P &p, const VP &poly){
    int n = poly.size();
    int ret = -1;
    for(int i=0; i<n; i++){
        P a = poly[i]-p;
        P b = poly[(i+1)%n]-p;
        if(a.Y > b.Y) swap(a,b);
        if(intersectSP(L(a,b), P(0,0))) return 0;
        if(a.Y<=0 && b.Y>0 && cross(a,b)<0) ret = -ret;
    }
    return ret;
}

int main(){
    while(1){
        string s;
        cin >> s;
        if(s == "end") break;

        double x,y;
        cin >> x >> y;
        VP poly;
        poly.emplace_back(x, y);
        while(1){
            string s;
            cin >> s;
            if(s == "close") break;
            if(s == "line"){
                double x,y;
                cin >> x >> y;
                poly.emplace_back(x, y);
            }
            if(s == "arc"){
                double x,y,r;
                cin >> x >> y >> r;
                int sign = (r > 0)? -1: 1;
                P curr = poly.back(), next = P(x, y);
                C c[2] = {C(curr, abs(r)), C(next, abs(r))};
                VP cp = crosspointCC(c[0], c[1]);
                P center = (ccw(curr, next, cp[0]) == sign)? cp[0]: cp[1];
                double angle = arg((next-center) /(curr-center));
                int split = 10000;
                for(int i=1; i<=split; i++){
                    poly.push_back(center +rotate(curr -center, angle *i/split));
                }
            }
        }

        P center = centroid(poly);
        string in = (in_poly(center, poly) >= 0)? "+" :"-";
        cout << fixed << setprecision(5);
        cout << center.X << " " << center.Y << " " << in << endl;

    }
    return 0;
}



Measured memory_bytes: 10396