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.io.*;
import java.util.*;


public class Main {


	public static class pair implements Comparable<pair>
	{
		int a;
		int b;
		public pair(int pa, int pb)
		{
			a = pa; b= pb;
		}
		@Override
		public int compareTo(pair o) {
			if(this.a < o.a)
				return -1;
			if(this.a > o.a)
				return 1;
			return Integer.compare(o.b, this.b);
		}
	}

	//int n = Integer.parseInt(in.readLine());
	//String[] spl = in.readLine().split(" ");

	public static void main (String[] args) throws Exception
	{	
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] spl = in.readLine().split(" ");
		int n = Integer.parseInt(spl[0]);
		int m = Integer.parseInt(spl[1]);
		ArrayList<pair> arr = new ArrayList<pair>();
		int[] cx = new int[]{0,0,n,n};
		int[] cy = new int[]{0,m,0,m};
		for (int dx = -2; dx < 3; dx++) {
			for (int dy = -2; dy < 3; dy++) {
				for (int i = 0; i < 4; i++) {
					int x = cx[i]+dx;
					int y = cy[i]+dy;
					if(x>=0 && x<=n && y>=0 && y<=m)
					{
						boolean found = false;
						for(pair p: arr)
						{
							if(p.a == x && p.b==y)
								found = true;
						}
						if(!found)
							arr.add(new pair(x,y));
					}
				}
			}
		}
		pair[] rta = new pair[4];
		double max = 0;
		for(int p1=0; p1<arr.size(); p1++)
			for(int p2=0; p2<arr.size(); p2++)if(p2!=p1)
				for(int p3=0;p3<arr.size(); p3++) if(p3!=p2 && p3!=p1)
					for(int p4=0; p4<arr.size(); p4++) if(p4!=p3 && p4!=p2 && p4!=p1)
					{
						double ans = dist(arr.get(p1),arr.get(p2)) + dist(arr.get(p2), arr.get(p3)) + dist(arr.get(p3),arr.get(p4));
						if(ans>max)
						{
							max = ans;
							rta = new pair[]{arr.get(p1),arr.get(p2),arr.get(p3),arr.get(p4)};
						}
					}
		//System.out.println(max);
		System.out.println(rta[0].a+" "+rta[0].b);
		System.out.println(rta[1].a+" "+rta[1].b);
		System.out.println(rta[2].a+" "+rta[2].b);
		System.out.println(rta[3].a+" "+rta[3].b);
				
	}

	private static double dist(pair pair, pair pair2) {
		double rr = (pair.a-pair2.a)*(pair.a-pair2.a) + (pair.b-pair2.b)*(pair.b-pair2.b);
		return Math.sqrt(rr);
	}
}