import java.io.*;
import java.util.*;

class Vertex {
    double x;
    double y;

    public Vertex(double x, double y) {
	this.x = x;
	this.y = y;
    }

    public String toString() {
	return x+","+y;
    }
}

class Polygon {
    int nbVertices;
    Vertex[] vertices;
    
    public Polygon() {
    }

    public void readParameters(Scanner scan) {
	double x,y;
	nbVertices = scan.nextInt();
	vertices = new Vertex[nbVertices];
	for(int i=0;i<nbVertices;i++) {
	    x = scan.nextDouble();
	    y = scan.nextDouble();
	    vertices[i] = new Vertex(x,y);
	}
    }
    
    public double perimeter() {
	double p = 0.0;

	/* à compléter avec le calcul du pérmiètre
	 */
        return p;	
    }
}

class PolyPeri {

    public static void main(String[] args) {
	Locale.setDefault(Locale.ENGLISH);
	
	Scanner scan = new Scanner(System.in);
	int nbPoly = scan.nextInt();
	
	for(int i=0;i<nbPoly;i++) {

	    Polygon p = new Polygon();
	    p.readParameters(scan);	   
	    System.out.println(p.nbVertices+" "+p.perimeter());
	}
    }
}
