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.InputStreamReader;
import java.util.InputMismatchException;
import java.util.ArrayList;
import java.io.PrintStream;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.io.InputStream;

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

class TaskB {
    /////////////////////////////////////////////////////////////

    public void solve(int testNumber, FastScanner in, FastPrinter out) {
    int n=in.nextInt(),m=in.nextInt();
        ArrayList<P> al = new ArrayList<P>();
        P[] ans= new P[4];
        al.add(new P(n,m));
        al.add(new P(Math.max(n-1,0),m));
        al.add(new P(n,Math.max(m-1,0)));
        al.add(new P(0,0));
        
al.add(new P(0,m));
al.add(new P(n,0));
        al.add(new P(0,Math.min(1,m)));
        al.add(new P(Math.min(1,n),0));
        double len=-1;
        for (P p1 : al) {
            for (P p2 : al) {
                for (P p3 : al) {
                    for (P p4 : al) {
                       if(p1.equals(p2))continue;
                       if(p1.equals(p3))continue;
                       if(p1.equals(p4))continue;
                       if(p2.equals(p3))continue;
                       if(p2.equals(p4))continue;
                       if(p3.equals(p4))continue;
                    double lent=  getd(p1,p2)+getd(p2,p3)+getd(p3,p4);
                        if(lent>len){
                            len=lent;
                            ans[0]=p1;
                            ans[1]=p2;
                            ans[2]=p3;
                            ans[3]=p4;

                        }
                    }
                }
            }
        }
        for (P an : ans) {
            out.println(an.x+" "+an.y);
        }

    }
    static double getd(P p1, P p2){
        return Math.sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y));

    }
    class  P{
        int x,y;

        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof P)) return false;

            P p = (P) o;

            if (x != p.x) return false;
            if (y != p.y) return false;

            return true;
        }

        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

        P(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

}

class FastScanner extends BufferedReader {

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
//            if (isEOF && ret < 0) {
//                throw new InputMismatchException();
//            }
//            isEOF = ret == -1;
            return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    static boolean isWhiteSpace(int c) {
        return c >= 0 && c <= 32;
    }

    public int nextInt() {
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int ret = 0;
        while (c >= 0 && !isWhiteSpace(c)) {
            if (c < '0' || c > '9') {
                throw new NumberFormatException("digit expected " + (char) c
                        + " found");
            }
            ret = ret * 10 + c - '0';
            c = read();
        }
        return ret * sgn;
    }

    public String readLine() {
        try {
            return super.readLine();
        } catch (IOException e) {
            return null;
        }
    }

}

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }


}