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.List;
import java.io.IOException;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.util.Set;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
	public void solve(int testNumber, InputReader in, PrintWriter out) {
		int R = in.nextInt();
		int C = in.nextInt();

		Set<Integer> set = new HashSet<>();
		int[][] v = {{0, 0}, {R, 0}, {0, C}, {R, C}};
		for (int i = 0; i < v.length; i++) {
			for (int dr = -1; dr <= 1; dr++) {
				for (int dc = -1; dc <= 1; dc++) {
					int nr = v[i][0] + dr;
					int nc = v[i][1] + dc;
					if (nr >= 0 && nr <= R && nc >= 0 && nc <= C)
						set.add(nr * 10000 + nc);
				}
			}
		}
		List<int[]> list = new ArrayList<>();
		for (int rc : set)
			list.add(new int[]{rc / 10000, rc % 10000});

		int best = -1;
		int[] res = null;

		for (int i1 = 0; i1 < list.size(); i1++) {
			for (int i2 = 0; i2 < list.size(); i2++) {
				for (int i3 = 0; i3 < list.size(); i3++) {
					for (int i4 = 0; i4 < list.size(); i4++) {
						if (i1 != i2 && i1 != i3 && i1 != i4 && i2 != i3 && i2 != i4 && i3 != i4) {
							int cur = dist(list.get(i1), list.get(i2))
									+ dist(list.get(i2), list.get(i3))
									+ dist(list.get(i3), list.get(i4));
							if (best < cur) {
								best = cur;
								res = new int[]{i1, i2, i3, i4};
							}
						}
					}
				}
			}
		}

		for (int i = 0; i < 4; i++) {
			out.println(list.get(res[i])[0] + " " + list.get(res[i])[1]);
		}
	}

	int dist(int[] rc1, int[] rc2) {
		int dr = rc1[0] - rc2[0];
		int dc = rc1[1] - rc2[1];
		return dr * dr + dc * dc;
	}
}

class InputReader {
	final InputStream is;
	final byte[] buf = new byte[1024];
	int pos;
	int size;

	public InputReader(InputStream is) {
		this.is = is;
	}

	public int nextInt() {
		int c = read();
		while (isWhitespace(c))
			c = read();
		int sign = 1;
		if (c == '-') {
			sign = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res = res * 10 + c - '0';
			c = read();
		} while (!isWhitespace(c));
		return res * sign;
	}

	int read() {
		if (size == -1)
			throw new InputMismatchException();
		if (pos >= size) {
			pos = 0;
			try {
				size = is.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (size <= 0)
				return -1;
		}
		return buf[pos++] & 255;
	}

	static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

}