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

//Wrong answer when you don't have to split some edge.
//Ex: n = 4, square.

public class cake_ab_wa implements Runnable {

	final int MAXN = 15;
	final int MAXM = 100;
	final int MAXC = 1000;
	
	private void solve() throws IOException {
		int n = in.nextInt();
		assert 1 <= n && n <= MAXN;
		int m = in.nextInt();
		assert 3 <= m && m <= MAXM;
		
		double[] x = new double[m];
		double[] y = new double[m];
		for (int i = 0; i < m; ++i) {
			x[i] = in.nextInt();
			y[i] = in.nextInt();
			assert Math.abs(x[i]) <= MAXC;
			assert Math.abs(y[i]) <= MAXC;
		}
		
		for (int i = 0; i < m; ++i) {
			int j = (i + 1) % n;
			
			double a = y[j] - y[i];
			double b = x[i] - x[j];
			double c = - a * x[i] - b * y[i];
			
			assert a != 0 || b != 0;
			
			for (int k = 0; k < m; ++k) {
				if (k == i || k == j) continue;
				assert a * x[i] + b * y[i] + c > 0;
			}
		}
		
		double s = 0;
		for (int i = 0; i < m; ++i) {
			int j = (i + 1) % m;
			s += x[i] * y[j] - x[j] * y[i];
		}
		
		double x0 = x[0];
		double y0 = y[0];
		double px = x[1];
		double py = y[1];
		int p = 2;
		
		s /= n;
		
		while (n --> 0) {
			ArrayList<Double> ax = new ArrayList<Double>();
			ArrayList<Double> ay = new ArrayList<Double>();
			
			ax.add(x0);
			ay.add(y0);
			
			double ts = 0;
			while (ts < s - 1e-9) {
				ax.add(px);
				ay.add(py);				
				ts = ts + (px - x0) * (y[p] - y0) - (py - y0) * (x[p] - x0);
				px = x[p];
				py = y[p];
				p = (p + 1) % m;
			}
			p = (p + m - 1) % m;			
			int u = (p + m - 1) % m;
			double t = (s - ts) / ((x[p] - x0) * (y[u] - y0) - (y[p] - y0) * (x[u] - x0)); 
			
			px = x[p] * (1 - t) + x[u] * t;
			py = y[p] * (1 - t) + y[u] * t;
			ax.add(px);
			ay.add(py);
			
			out.println(ax.size());
			for (int i = 0; i < ax.size(); ++i) {
				out.println(ax.get(i) + " " + ay.get(i));
			}
		}
	}

	final String FILE_NAME = "cake";

	SimpleScanner in;
	PrintWriter out;

	@Override
	public void run() {
		try {
			in = new SimpleScanner(new FileReader(FILE_NAME + ".in"));
			out = new PrintWriter(FILE_NAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(-1);
		}
	}

	public static void main(String[] args) {
		new Thread(new cake_ab_wa()).start();
	}

	class SimpleScanner extends BufferedReader {

		private StringTokenizer st;
		private boolean eof;

		public SimpleScanner(Reader a) {
			super(a);
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(readLine());
				} catch (Exception e) {
					eof = true;
					return "";
				}
			}
			return st.nextToken();
		}

		boolean seekEof() {
			String s = next();
			if ("".equals(s) && eof)
				return true;
			st = new StringTokenizer(s + " " + st.toString());
			return false;
		}

		private String cnv(String s) {
			if (s.length() == 0)
				return "0";
			return s;
		}

		int nextInt() {
			return Integer.parseInt(cnv(next()));
		}

		double nextDouble() {
			return Double.parseDouble(cnv(next()));
		}

		long nextLong() {
			return Long.parseLong(cnv(next()));
		}
	}
}