from math import pi, cos, sin
from itertools import combinations

def centerP(a, b ,c):
  da = dist(b, c)
  db = dist(c, a)
  dc = dist(a, b)
  dt = da + db + dc
  return (da*a[0] + db*b[0] + dc*c[0])/dt, (da*a[1] + db*b[1] + dc*c[1])/dt

def dist(a, b):
  return ((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)**.5

N, L = map(int, input().split())
P = []
for i in range(N): 
  T = int(input())
  P.append([cos(2 * pi * T / L), sin(2 * pi * T / L)])

sumx = 0
sumy = 0
li = combinations(P,3)

cnt = 0
for a,b,c in li:
  x, y = centerP(a, b ,c)
  sumx += x
  sumy += y
  cnt += 1

print(sumx/cnt, sumy/cnt)