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:
//Author: net12k44
import java.io.*;
import java.util.*;
//public
class Main{//}

static class Data{
	int x, y;
	public Data() {};
	public Data(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	@Override
	public int hashCode(){		
		return x*10000 + y;
	}
	//*	
	public boolean equals(Object obj){		
		if (!(obj instanceof Data)) return false;
		if (obj == this) return true;
		return obj.hashCode() == this.hashCode();
	}
	//*/
}

double result;
int res[] = new int[4];

boolean check(int m, int n, Data x){
	return (0 <= x.x && x.x <= m && 0 <= x.y && x.y <= n);
}
//*
void dfs(int m, int n, Data[] a, boolean b[], int d[], int cur){
	if (cur == 4) {
		double t = 0;
		for(int k = 0; k < 3; ++k){
			int i = d[k], j = d[k+1];
			t += Math.hypot( a[i].x - a[j].x, a[i].y - a[j].y );
		}
		if (t > result){
			result = t;
			for(int i = 0; i < 4; ++i) res[i] = d[i];
		}
	}
	else
	for(int i = 0; i < a.length; ++i)
		if (!b[i] && check(m,n,a[i])){
			d[cur] = i;
			b[i] = true;
			dfs(m,n,a,b,d,cur+1);
			b[i] = false;				
		}

}

private void solve() {
	int m = in.nextInt(), n = in.nextInt();
	
	HashSet<Data> point = new HashSet<Data>();
	for(int i = 0; i < 2; ++i){	
		point.add( new Data(0,0+i) );		
		point.add( new Data(0,n-i) );
		point.add( new Data(0+i,0) );
		point.add( new Data(0+i,n) );
		
		point.add( new Data(m,0+i) );
		point.add( new Data(m,n-i) );
		point.add( new Data(m-i,0) );
		point.add( new Data(m-i,n) );
	}
	
	Data[] a = point.toArray(new Data[0]);
	boolean[] b = new boolean[a.length];
	int[] d = new int[a.length];
	int nn = a.length;
	//for(Data x: a) out.println(x.x+" "+x.y);
	dfs(m,n,a,b,d,0);	
	for(int i: res)
		out.println(a[i].x+" "+a[i].y);
		
	
		
	
}

	
public static void main (String[] args) throws java.lang.Exception {		
	long startTime = System.currentTimeMillis();

	out = new PrintWriter(System.out);
	new Main().solve();	
	//out.println((String.format("%.2f",(double)(System.currentTimeMillis()-startTime)/1000)));
	out.close();
}
static PrintWriter out;
static class in {
	static BufferedReader reader = new BufferedReader( new InputStreamReader(System.in) ) ;
	static StringTokenizer tokenizer = new StringTokenizer("");				
	static String next() {		
		while ( !tokenizer.hasMoreTokens() )
			try { tokenizer = new StringTokenizer( reader.readLine() ); }
			catch (IOException e){
				throw new RuntimeException(e);			
			}		
		return tokenizer.nextToken();
	}
	static int nextInt() { return Integer.parseInt( next() ); }			
}
//////////////////////////////////////////////////
}//