import java.util.*;

public class GenRandom {
	
	static Random rand;
	
	public static class Point {
		public int x, y;
		
		Point () {
			x = 0;
			y = 0;
		}
		
		Point (int x, int y) {
			this.x = x;
			this.y = y;
		}
		
		public void rand () {
			x = rand.nextInt() % 10000 + 1;
			y = rand.nextInt() % 10000 + 1;
		}

		public Point substract(Point a) {
			return (new Point(x - a.x, y - a.y));
		}
		
		public double vProd(Point a) {
			return x * a.y - y * a.x;
		}
	}
	
	public static boolean cross (Point a, Point b, Point c, Point d) {
		int x1 = Math.min(a.x, b.x);
		int y1 = Math.min(a.y, b.y);
		int x2 = Math.max(a.x, b.x);
		int y2 = Math.max(a.y, b.y);
		int x3 = Math.min(c.x, d.x);
		int y3 = Math.min(c.y, d.y);
		int x4 = Math.max(c.x, d.x);
		int y4 = Math.max(c.y, d.y);
		if (!(x2 >= x3 && x4 >= x1 && y2 >= y3 && y4 >= y1)) {
			return false;
		}
		if ((d.substract(a)).vProd(b.substract(a)) * (c.substract(a)).vProd(b.substract(a)) < 0) {
			if ((b.substract(c)).vProd(d.substract(c)) * (a.substract(c)).vProd(d.substract(c)) < 0) {
				return true;
			}
			return false;
		}
		return false;
	}
	
	public static void main(String[] args) {
		rand = new Random();
		Point a = new Point();
		Point b = new Point();
		Point c = new Point();
		Point d = new Point();
		for(int i = 0; i < 1000; ++i) {
			a.rand();
			b.rand();
			c.rand();
			d.rand(); 
			while (cross(a, b, c, d)) {
				a.rand();
				b.rand();
				c.rand();
				d.rand();
			}
			System.out.println(a.x + " " + a.y + " " + b.x + " " + b.y);
			System.out.println(c.x + " " + c.y + " " + d.x + " " + d.y);
			System.out.println();
		}
		System.out.println("0 0 0 0");
		System.out.println("0 0 0 0");
		System.out.println();
	}
} 