No tags yet

No tag edit access

time limit per test: 0.25 sec.

memory limit per test: 4096 KB

memory limit per test: 4096 KB

input: standard

output: standard

output: standard

Ber-islands Archipelago consists of N islands and has a form of regular N-gon. Islands are numbered in a clockwise order. Coordinates of the N1-th island are (X1, Y1), and of the N2-th island are - (X2, Y2). You are to write a program which will find coordinates of all islands.

The input contains three integers N, N1, N2 (3<=N<=150, 1<=N1,N2<=N, N1<>N2). The following two pairs of real numbers are coordinates of N1-th and N2-th islands. All absolute values of coordinates do not exceed 10^6. All numbers separated by white spaces.

Output coordinates of the islands in order of numeration on separate lines. The computed coordinates should be exact to six digits after the decimal point.

Input

4 1 3

1.0000 0.0000

1.0000 2.0000

1.0000 0.0000

1.0000 2.0000

Output

1.000000 0.000000

0.000000 1.000000

1.000000 2.000000

2.000000 1.000000

0.000000 1.000000

1.000000 2.000000

2.000000 1.000000

Author: | Michael R. Mirzayanov |

Resource: | --- |

Date: | -- |

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/15/2019 23:25:03 (f2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|