Under construction

Still being built. Things may change

Moving Furniture

Time limit2sMemory limit512 MB

Summary
Given 4N leg hollow coordinates from N square tables, find the total area of all tables, which the points alone determine.
Level

Hard8 of 10

Topics
Geometry, Math
Solved
No attempts yet

Problem

Binary Casino has been open nonstop for a long time. The carpet and furniture are badly damaged and look bad, so the casino needs renovation. While the renovation takes place, the four-legged game tables from all game rooms are stored in a storage room.

Your task is not difficult. Your boss asks you to move the game tables back to the exact places where they stood before the renovation. Each game table top is a square, and each table leg is located exactly under a corner of the top. Luckily, the carpet still has small hollows made by the table legs where the tables stood, and you know how many tables were in the room. Your boss does not remember where the tables were placed. The boss does know the total area of all game tables in the room, and insists that this total stays the same.

You must use every hollow in the carpet to place the tables, putting one table leg into each hole. The tables cannot overlap.

Input

The first line contains an integer NN (1≤N≤3⋅1031 \le N \le 3 \cdot 10^3), the number of game tables. Then 4N4N lines follow, each containing two integers XX and YY (−109≤X,Y<109-10^9 \le X, Y < 10^9), the coordinates of a hollow in the carpet. The hollows are listed in arbitrary order, and no two hollows have the same coordinates.

Output

Output a single number: the sum of the areas of all game tables in the room. The answer is correct if it differs from the correct answer by at most 10−310^{-3}.

Examples2

  1. Example 1

    Input
    4
    1 0
    1 -1
    0 0
    0 1
    -2 -1
    -2 1
    -1 -2
    -2 -3
    -3 -2
    -1 1
    -1 -1
    -3 -1
    -3 1
    0 -1
    -2 3
    0 3
    
    Expected output
    11
    
  2. Example 2

    Input
    1
    0 0
    3 4
    -1 7
    -4 3
    
    Expected output
    25.0000