Problem: You are given a rectangular grid of lattice points from (0, 0) to (n, m) inclusive. You have to choose exactly 4 different points to build a polyline possibly with self-intersections and self-touching. This polyline should be as long as possible.

A polyline defined by points p1, p2, p3, p4 consists of the line segments p1 p2, p2 p3, p3 p4, and its length is the sum of the lengths of the individual line segments.

Input

The only line of the input contains two integers n and m (0 ≤ n, m ≤ 1000). It is guaranteed that grid contains at least 4 different points.

Output

Print 4 lines with two integers per line separated by space — coordinates of points p1, p2, p3, p4 in order which represent the longest possible polyline.

Judge program compares your answer and jury's answer with 10 - 6 precision.

Examples

Input

1 1


Output

1 1
0 0
1 0
0 1


Input

0 10


Output

0 1
0 10
0 0
0 9

Solution (in JAVA):

Solution:
import java.util.Scanner;


public class T452B {
	public void solve(int n, int m) {
		
		int [] x = new int[4];
		int [] y = new int[4];
		if (n == 0 && m == 0) {
		} else if (n > 0 && m > 0) {
			double max1 = 2 * Math.sqrt(m * m + n * n) + (m > n ? m : n);
			double max2 = Math.sqrt(m * m + n * n) + 2 * Math.sqrt(m * m + (n - 1) * (n - 1));
			double max3 = Math.sqrt(m * m + n * n) + 2 * Math.sqrt((m - 1) * (m - 1) + n * n);
			
			if (max1 > max2 && max1 > max3) {
				x[0] = 0;
				y[0] = 0;
				x[1] = n;
				y[1] = m;
				if (m > n) {
					x[2] = n;
					y[2] = 0;
					x[3] = 0;
					y[3] = m;
				} else {
					x[2] = 0;
					y[2] = m;
					x[3] = n;
					y[3] = 0;
				}
			} else if (max2 > max1 && max2 >= max3) {
				x[0] = n - 1;
				y[0] = m;
				x[1] = 0;
				y[1] = 0;
				x[2] = n;
				y[2] = m;
				x[3] = 1;
				y[3] = 0;
			} else if (max3 > max1 && max3 >= max2) {
				x[0] = n;
				y[0] = m - 1;
				x[1] = 0;
				y[1] = 0;
				x[2] = n;
				y[2] = m;
				x[3] = 0;
				y[3] = 1;
			}
		} else if (n == 0 && m > 0){
			x[0] = n;
			y[0] = 1;
			x[1] = n;
			y[1] = m;
			x[2] = 0;
			y[2] = 0;
			x[3] = n;
			y[3] = m - 1;
		} else if (n > 0 && m == 0) {
			x[0] = 1;
			y[0] = m;
			x[1] = n;
			y[1] = m;
			x[2] = 0;
			y[2] = 0;
			x[3] = n - 1;
			y[3] = m;
		}
		for (int i = 0; i < 4; i ++)
			System.out.println(x[i] + " " + y[i]);
	}
	
	public static void main(String[] args) {
		T452B t = new T452B();
		/*
		int n0 = 1;
		int m0 = 1;
		
		int n1 = 0;
		int m1 = 10;
		
		int n2 = 10;
		int m2 = 10;
		
		int n3 = 10;
		int m3 = 100;
		
		t.solve(n0, m0);
		t.solve(n1, m1);
		t.solve(n2, m2);
		t.solve(n3, m3);
		*/
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int m = in.nextInt();
		t.solve(n, m);
	}

}