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

public class TaskB_452 {

    public static void main(String[] args) {
        input();
        solve();
    }

    private static void solve() {
        String p1 = "0 0\n";
        String p2 = "0 0\n";
        String p3 = "0 0\n";
        String p4 = "0 0\n";

        if (n == 0 && m == 0) {
            System.out.println(p1 + p2 + p3 + p4);
            return;
        }
        if (n == 0 && m != 0) {
            p1 = "0 1\n";
            p2 = 0 + " " + m + "\n";
            p4 = 0 + " " + (m - 1) + "\n";
            System.out.println(p1 + p2 + p3 + p4);
            return;
        }
        if (m == 0 && n != 0) {
            p1 = "1 0\n";
            p2 = n + " " + 0 + "\n";
            p4 = (n - 1) + " " + 0 + "\n";
            System.out.println(p1 + p2 + p3 + p4);
            return;
        }

        int maxE = m > n ? m : n;
        double dia = Math.sqrt(m * m + n * n);
        double sum = dia * 2 + maxE;
        double sum1 = 0;
        if (n == m) {
            sum1 = dia + Math.sqrt(m * m + (n - 1) * (n - 1))
                    + Math.sqrt((m - 1) * (m - 1) + n * n);
        } else {
            if (m > n) {
                sum1 = dia + Math.sqrt(m * m + (n - 1) * (n - 1)) * 2;
            } else {
                sum1 = dia + Math.sqrt(n * n + (m - 1) * (m - 1)) * 2;
            }
        }

        if (sum >= sum1) {
            p1 = "0 0\n";
            p2 = n + " " + m + "\n";
            p3 = n >= m ? "0 " + m + "\n" : n + " 0" + "\n";
            p4 = n >= m ? n + " 0" : "0 " + m + "\n";
        } else {
            p1 = n >= m ? "0 1\n" : "1 0\n";
            p2 = n + " " + m + "\n";
            p3 = "0 0\n";
            p4 = n >= m ? n + " " + (m - 1) + "\n" : (n - 1) + " " + m + "\n";
        }
        System.out.println(p1 + p2 + p3 + p4);
    }

    /*****************************************************************
     **************************** INPUT ******************************
     *****************************************************************/
    static int n;
    static int m;

    private static void input() {
        n = ni();
        m = ni();
    }

    /*****************************************************************
     ******************** BASIC READER *******************************
     *****************************************************************/

    static InputStream is = System.in;
    static private byte[] inbuf = new byte[1024];
    static private int lenbuf = 0, ptrbuf = 0;

    static private int readByte() {
        if (lenbuf == -1)
            throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0)
                return -1;
        }
        return inbuf[ptrbuf++];
    }

    static private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    static private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b))
            ;
        return b;
    }

    static private double nd() {
        return Double.parseDouble(ns());
    }

    static private char nc() {
        return (char) skip();
    }

    static private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    static private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    static private char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for (int i = 0; i < n; i++)
            map[i] = ns(m);
        return map;
    }

    static private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = ni();
        return a;
    }

    static private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
            ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
            ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }

        while (true) {
            if (b >= '0' && b <= '9') {
                num = num * 10 + (b - '0');
            } else {
                return minus ? -num : num;
            }
            b = readByte();
        }
    }
}