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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author George Marcus
 */
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 {
    int[][] P;
    int K;
    double maxD;
    int[] st;
    boolean[] used;
    int[] best;
    int N;
    int M;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        N = in.nextInt();
        M = in.nextInt();

        P = new int[16][2];
        K = 0;
        add(0, 0);
        add(N - 1, M - 1);
        add(N - 1, 0);
        add(0, M - 1);

        maxD = 0;
        st = new int[4];
        used = new boolean[16];
        best = new int[4];
        back(0);

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

    private void back(int p) {
        if (p == 4) {
            double d = 0;
            for (int i = 0; i < 3; i++) {
                d += dist(P[st[i]], P[st[i + 1]]);
            }
            if (d > maxD) {
                maxD = d;
                for (int i = 0; i < 4; i++) {
                    best[i] = st[i];
                }
            }
            return;
        }

        for (int i = 0; i < 16; i++) {
            boolean ok = true;
            for (int j = 0; j < p; j++) {
                if (P[st[j]][0] == P[i][0] && P[st[j]][1] == P[i][1]) {
                    ok = false;
                }
            }

            if (ok) {
                st[p] = i;
                back(p + 1);
            }
        }
    }

    private double dist(int[] a, int[] b) {
        double di = a[0] - b[0];
        double dj = a[1] - b[1];
        return Math.sqrt(di * di + dj * dj);
    }

    private void add(int pi, int pj) {
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < 2; j++) {
                int ni = Math.min(N, pi + i);
                ni = Math.max(0, ni);
                P[K][0] = ni;
                int nj = Math.min(M, pj + j);
                nj = Math.max(0, nj);
                P[K][1] = nj;
                K++;
            }
        }
    }
}

class InputReader {
    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

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

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

    public String nextString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));

        return res.toString();
    }

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

}