public static void main(String[] args) throws Exception {
		int N=6000;
		if (args.length>=1) N=Integer.parseInt(args[0]);

		Crb=new double[N+7]; Cib=new double[N+7];
		double invN=2.0/N; for(int i=0;i<N;i++){ Cib[i]=i*invN-1.0; Crb[i]=i*invN-1.5; }
		yCt=new AtomicInteger();
		out=new byte[N][(N+7)/8];

		Thread[] pool=new Thread[2*Runtime.getRuntime().availableProcessors()];
		for (int i=0;i<pool.length;i++)
			pool[i]=new Thread(){
				public void run() {
					int y; while((y=yCt.getAndIncrement())<out.length) putLine(y,out[y]);
				}
			};
		for (Thread t:pool) t.start();
		for (Thread t:pool) t.join();

		OutputStream stream = new BufferedOutputStream(System.out);
		stream.write(("P4\n"+N+" "+N+"\n").getBytes());
		for(int i=0;i<N;i++) stream.write(out[i]);
		stream.close();
	}