import sys sys.setrecursionlimit(200005) int1 = lambda x: int(x)-1 pDB = lambda *x: print(*x, end="\n", file=sys.stderr) p2D = lambda x: print(*x, sep="\n", end="\n\n", file=sys.stderr) def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def LI1(): return list(map(int1, sys.stdin.readline().split())) def LLI1(rows_number): return [LI1() for _ in range(rows_number)] def SI(): return sys.stdin.readline().rstrip() # dij = [(0, 1), (-1, 0), (0, -1), (1, 0)] # dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)] # inf = (1 << 63)-1 inf = (1 << 32)-1 # md = 10**9+7 md = 998244353 def FI(): return list(map(float, sys.stdin.readline().split())) class p: def __init__(self, x, y=None): if y == None: x, y = x[0], x[1] self.x = x self.y = y def __repr__(self): return "("+str(self.x)+" "+str(self.y)+")" def __add__(self, other): return p(self.x+other.x, self.y+other.y) def __sub__(self, other): return p(self.x-other.x, self.y-other.y) def __truediv__(self, other): return p(self.x/other, self.y/other) def norm(self): return (self.x**2+self.y**2)**0.5 def arg(self): return atan2(self.y, self.x) def rot(self, cen, rad): res = p(self.x, self.y) tmp = res-cen d = tmp.norm() a = tmp.arg()+rad return p(d*cos(a), d*sin(a))+cen from math import * def angle(r1, r2, m1, m2): rg = (r1+r2)/2 mg = (m1+m2)/2 r1 = r1-rg m1 = m1-mg ra = r1.arg() ma = m1.arg() return ra-ma sx, sy, sd = FI() s = p(sx, sy) r1 = p(FI()) r2 = p(FI()) m1 = p(FI()) m2 = p(FI()) a = angle(r1, r2, m1, m2) m1 = m1.rot(s, a) m2 = m2.rot(s, a) # print(r1-m1,r2-m2) sd += degrees(a) s = s+r1-m1 print(s.x, s.y, sd)