import math
def calc_incenters(x,y,xx,yy,xxx,yyy):
    def calc_len(x,y,xx,yy):
        return(math.sqrt((x - xx)**2 + (y - yy)**2))
    a = calc_len(x,y,xx,yy)
    b = calc_len(xx,yy,xxx,yyy)
    c = calc_len(xxx,yyy,x,y)
    out_x = (a * xxx + b * x + c * xx)/(a+b+c)
    out_y = (a * yyy + b * y + c * yy)/(a+b+c)
    return([out_x, out_y])
n,l =map(int, input().split())
tlis = []
for i in range(n):
    t = int(input())
    tlis.append(t)
xlis = []
ylis = []
for i in range(n-2):
    for j in range(n-i-2):
        for k in range(n-j-i-2):
            xlis.append(calc_incenters(math.cos(2*math.pi*tlis[i]/l), math.sin(2*math.pi*tlis[i]/l), math.cos(2*math.pi*tlis[j+i+1]/l),math.sin(2*math.pi*tlis[j+i+1]/l), math.cos(2*math.pi*tlis[k+j+i+2]/l), math.sin(2*math.pi*tlis[k+j+i+2]/l))[0])
            ylis.append(calc_incenters(math.cos(2*math.pi*tlis[i]/l), math.sin(2*math.pi*tlis[i]/l), math.cos(2*math.pi*tlis[j+i+1]/l),math.sin(2*math.pi*tlis[j+i+1]/l), math.cos(2*math.pi*tlis[k+j+i+2]/l), math.sin(2*math.pi*tlis[k+j+i+2]/l))[1])
print(sum(xlis)/len(xlis),sum(ylis)/len(ylis))
