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.*;
import java.util.Map.Entry;
import java.io.*;
import java.awt.Point;
import java.math.BigInteger;

import static java.lang.Math.*;

public class CodeforcesB implements Runnable {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    public static void main(String[] args) {
        new Thread(null, new CodeforcesB(), "", 128 * (1L << 20)).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    void debug(Object... objects) {
        if (DEBUG) {
            for (Object o : objects) {
                System.err.println(o.toString());
            }
        }
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            time();
            memory();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    int[] readIntArray(int n) throws IOException {
        int[] array = new int[n];
        for (int i = 0; i < n; i++)
            array[i] = readInt();
        return array;
    }

    boolean DEBUG = false;

    void solve() throws IOException {

        int n = readInt();
        int m = readInt();

        if (n > 0 && m > 0) {

            double value1 = Math.sqrt(n * n + m * m) * 2 + n;
            double value2 = Math.sqrt((n - 1) * (n - 1) + m * m) * 2
                    + Math.sqrt(n * n + m * m);
            double value3 = Math.sqrt(n * n + m * m) * 2 + m;
            double value4 = Math.sqrt(n * n + (m - 1) * (m - 1)) * 2
                    + Math.sqrt(n * n + m * m);

            double max = value1;
            if (value2 > max)
                max = value2;
            if (value3 > max)
                max = value3;
            if (value4 > max)
                max = value4;

            if (max == value2) {
                out.println("1 0");
                out.println(n + " " + m);
                out.println(0 + " " + 0);
                out.println((n - 1) + " " + m);
                return;
            }
            if (max == value1) {
                out.println("0 0");
                out.println(n + " " + m);
                out.println("0 " + m);
                out.println(n + " 0");
                return;
            }

            if (max == value4) {
                out.println("0 1");
                out.println(n + " " + m);
                out.println(0 + " " + 0);
                out.println(n + " " + (m - 1));
                return;
            } else {
                out.println("0 0");
                out.println(n + " " + m);
                out.println(n + " 0");
                out.println("0 " + m);
            }
            return;

        }

        if (n == 0) {
            out.println("0 " + 1);
            out.println("0 " + m);
            out.println("0 " + 0);
            out.println("0 " + (m - 1));
        }

        if (m == 0) {
            out.println(1 + " 0");
            out.println(n + " 0");
            out.println(0 + " 0");
            out.println((n - 1) + " 0");
        }

    }
}