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.PrintWriter;
import java.util.Scanner;

public class B {

    static void solve() throws IOException {
        int m = in.nextInt();
        int n = in.nextInt();
        Point[] best = null;
        double l = -1;
        Point[] cur = new Point[4];
        for ( int i=  0; i < 4; i ++ ) {
            cur[i] = new Point( 0, 0 );
        }
        for ( cur[0].x = 0; cur[0].x <= m && cur[0].x < 4; cur[0].x ++ ) {
            for ( cur[0].y = 0; cur[0].y <= n && cur[0].y < 4; cur[0].y ++ ) {
                for ( cur[1].x = m; cur[1].x >= 0 && cur[1].x > m - 4; cur[1].x -- ) {
                    for ( cur[1].y = n; cur[1].y >= 0 && cur[1].y > n - 4; cur[1].y -- ) {
                        for ( cur[2].x = 0; cur[2].x <= m && cur[2].x < 4; cur[2].x ++ ) {
                            for ( cur[2].y = 0; cur[2].y <= n && cur[2].y < 4; cur[2].y ++ ) {
                                for ( cur[3].x = m; cur[3].x >= 0 && cur[3].x > m - 4; cur[3].x -- ) {
                                    for ( cur[3].y = n; cur[3].y >= 0 && cur[3].y > n - 4; cur[3].y -- ) {
                                        boolean eq = false;
                                        for ( int i = 0; i < cur.length; i ++ ) {
                                            for ( int j = 0; j < i; j ++ ) {
                                                if ( cur[i].equals( cur[j] ) ) {
                                                    eq = true;
                                                }
                                            }
                                        }
                                        if ( eq ) {
                                            continue;
                                        }
                                        double len = Math.hypot( cur[0].x - cur[1].x, cur[0].y - cur[1].y ) +
                                                Math.hypot( cur[1].x - cur[2].x, cur[1].y - cur[2].y ) +
                                                Math.hypot( cur[2].x - cur[3].x, cur[2].y - cur[3].y );
                                        if ( len > l ) {
                                            l = len;
                                            best = new Point[4];
                                            for ( int i = 0; i < 4; i ++ ) {
                                                best[i] = new Point( cur[i] );
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        for ( int i = 0; i < 4; i ++ ) {
            out.println( best[i].x + " " + best[i].y );
        }
    }

    static class Point {
        int x;
        int y;

        public Point(int X, int Y) {
            x = X;
            y = Y;
        }

        public Point( Point p ) {
            this( p.x, p.y );
        }

        @Override
        public boolean equals(Object obj) {
            if ( ! (obj instanceof Point) ) {
                return false;
            }
            Point p = ( Point ) obj;
            return x == p.x && y == p.y;
        }
    }



    static Scanner in;
//    static StreamTokenizer in;
    static PrintWriter out;

//    static int nextInt() throws IOException {
//        in.nextToken();
//        return ( int ) in.nval;
//    }

    public static void main( String[] args ) throws IOException {
        in = new Scanner( System.in );
//        in = new StreamTokenizer( new InputStreamReader( System.in ) );
        out = new PrintWriter( System.out );
        solve();
        out.close();
    }
}