N^2 will give tle


#1

Use coordinate compression!


#2

1<n<=10
this website is broken