
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Let  $n$  be a positive integer. Given are points  $P_1,\ P_2,\ \cdots,\ P_{4n}$  of which any three points are not collinear. For  $i=1,\ 2,\ \cdots,\ 4n$ , rotating half-line  $P_iP_{i-1}$  clockwise in  $90^\circ$  about the pivot   $P_i$  gives half-line  $P_iP_{i+1}.$  Find the maximum value of the number of the pairs of  $(i,\ j)$  such that line segments  $P_iP_{i+1}$  and  $P_jP_{j+1}$  intersect at except endpoints. 
Note that :  $P_0=P_{4n},\ P_{4n+1}=P_1$  and  $1\leq i<j\leq 4n.$ 

Present the answer in LaTex format: \boxed{Your answer}
user