YJC counts stars

Time Limit: 1000ms
Memory Limit: 262144KB
This problem will be judged on HDU. Original ID: 5277
64-bit integer IO format: %I64d      Java class name: Main

Description

YJC is an old driver of mini train. One night he looked up to the sky and realised that the sky can be abstracted as a plane G and the stars can be abstracted as some points in the plane.
He labeled the points from $1$ to $n$. Also, he couldn't find a line crossing three points. YJC connected some points with some segments. But he made sure the segments wouldn't cross each other. YJC is extremely interested in some subsets of the points in which every two points are connected. He wants to find the subsets with maximum points and count them.

Input

Multiple tests.

For each test:

The first line lie two integers $n,m$,indicating the number of points and the number of segments in G.
The next $n$ lines each line lie two integers $x,y$, indicating the coordinates of the $i$th point.
The next $m$ lines each line lie two integers $u,v$, indicating an segment (u,v).

Output

For each test:

Two integers sz and sum, representing the number of the maximum points and the number of the maximum subsets.

Sample Input

2 1
1 1
2 2
1 2
3 3
1 1
2 2
4 5
1 2
2 3
3 1

Sample Output

2 1
3 1

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .