#!/usr/bin/env python3
import numpy as np

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    N = int(input())
    x0,y0=map(int,input().split(" "))
    xN2,yN2=map(int,input().split(" "))

    xb = (x0+xN2)/2 
    yb = (y0+yN2)/2

    nx0 = x0 - xb 
    ny0 = y0 - yb 
    theta = 2*np.pi/N

    cos = np.cos(theta)
    sin = np.sin(theta)

    x_ = cos*nx0 + -sin*ny0 + xb
    y_ = sin*nx0 + cos*ny0 + yb
    print(x_,y_)

if __name__ == '__main__':
    main()
