### constant

DIV = 1000

PI2 = 2 * Math::PI

### classes

class Pt
  attr_accessor :x, :y

  def initialize() end
  def initialize(x, y) @x = x; @y = y end

  def ==(pt) @x == pt.x && @y == pt.y end
  def +(pt) Pt.new(@x + pt.x, @y + pt.y) end
  def -(pt) Pt.new(@x - pt.x, @y - pt.y) end
  def -@() Pt.new(-@x, -@y) end
  def *(t) Pt.new(@x * t, @y * t) end
  def /(t) Pt.new(@x / t, @y / t) end
  def dot(v) @x * v.x + @y * v.y end
  def cross(v) @x * v.y - @y * v.x end
  def d2() @x * @x + @y * @y end
  def d() Math.sqrt(d2()) end
  def normalize() self / d() end
  def to_s() "(#{@x},#{@y})" end
end

### subroutines

def gcenter(pts)
  npts = pts.length
  gp = Pt.new(0.0, 0.0)
  ar = 0.0
  
  for i in (0...npts)
    j = (i + 1) % npts
    ari = pts[i].cross(pts[j]) / 2
    gpi = (pts[i] + pts[j]) / 3

    gp += gpi * ari
    ar += ari
  end

  gp / ar
end

def contains?(pts, gcp)
  npts = pts.length
  cn = 0
  
  for i in (0...npts)
    pt0 = pts[i]
    pt1 = pts[(i + 1) % npts]

    if pt0.y == gcp.y && pt1.y < gcp.y
      cn += 1 if pt0.x >= gcp.x
    elsif pt1.y == gcp.y && pt0.y < gcp.y
      cn += 1 if pt1.x >= gcp.x
    elsif (pt0.y - gcp.y) * (pt1.y - gcp.y) < 0.0
      t = (gcp.y - pt0.y) / (pt1.y - pt0.y) 
      x = (pt1.x - pt0.x) * t + pt0.x
      cn += 1 if x >= gcp.x
    end
  end

  (cn & 1) == 1
end

### main

loop do
  line = gets.strip
  break if line == 'end'

  cmd, x, y = line.split
  spt = Pt.new(x.to_f, y.to_f)
  #p spt.to_s

  pts = [spt]
  pt0 = spt
  
  loop do
    cmds = gets.strip.split
    case cmds[0]
    when 'close'
      pts.pop if pts.last == spt
      break
    when 'line'
      pt1 = Pt.new(cmds[1].to_f, cmds[2].to_f)
      pts << pt1
      pt0 = pt1
    when 'arc'
      pt1 = Pt.new(cmds[1].to_f, cmds[2].to_f)
      r = cmds[3].to_f

      v = pt1 - pt0
      pt2 = v / 2 + pt0
      vd2 = v.d2
      cd = Math.sqrt(r * r - vd2 / 4)

      nv = ((r < 0.0) ? Pt.new(-v.y, v.x) : Pt.new(v.y, -v.x)).normalize
      cp = nv * cd + pt2

      v0 = pt0 - cp
      v1 = pt1 - cp
      th0 = Math.atan2(v0.y, v0.x)
      th1 = Math.atan2(v1.y, v1.x)
      th = th1 - th0
      while th < 0.0
        th += 2 * PI2
      end
      while th > PI2
        th -= PI2
      end
      th = PI2 - th if r > 0.0
      dth = (r < 0.0) ? th / DIV : -th / DIV
      ra = r.abs
      
      for k in (1...DIV)
        thk = th0 + dth * k
        pts << Pt.new(ra * Math.cos(thk) + cp.x, ra * Math.sin(thk) + cp.y)
      end
      pts << pt1
      
      pt0 = pt1
    end
  end
  npts = pts.length
  #p pts.map{|pt| pt.to_s}
  #p arcs

  gcp = gcenter(pts)
  cnt = contains?(pts, gcp)

  puts ([gcp.x, gcp.y].map{|f| "%.5f" % f} + [cnt ? '+' : '-']).join(' ')
end