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

public class CF_452B {

    public static void main(String[] args) throws IOException {
        new CF_452B().solve();
    }

    class Point {

        int x, y;

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

        @Override
        public boolean equals(Object o) {
            Point p2 = (Point) o;
            return x == p2.x && y == p2.y;
        }

        double norm() {
            return Math.pow(this.x * this.x + this.y * this.y, 0.5);
        }
    }

    Point sum(Point a, Point b) {
        return new Point(a.x + b.x, a.y + b.y);

    }

    Point minus(Point a, Point b) {
        return new Point(a.x - b.x, a.y - b.y);

    }

    double length(ArrayList<Point> al, int n, int m) {
        for (int i = 0; i < al.size(); i++) {
            if (!(0 <= al.get(i).x && al.get(i).x <= n
                    && 0 <= al.get(i).y && al.get(i).y <= m)) {
                return 0;
            }

            for (int j = i + 1; j < al.size(); j++) {
                if (al.get(i).equals(al.get(j))) {
                    return 0;
                }
            }
        }
        //System.out.println(al);
        double acc = 0;
        for (int i = 1; i < al.size(); i++) {
            acc += minus(al.get(i - 1), al.get(i)).norm();
        }
        return acc;
    }
    
    Object[] defCornersSequenceSolve(int n, int m){
        ArrayList<Point> edges = new ArrayList<>();
        edges.add(new Point(0, 0));
        edges.add(new Point(n, m));
        edges.add(new Point(0, 0));
        edges.add(new Point(n, m));
        Object[] res=solveDirect(edges, n, m);
        edges.clear();
        edges.add(new Point(0, 0));
        edges.add(new Point(n, m));
        edges.add(new Point(n, 0));
        edges.add(new Point(0, m));
        Object[] tempRes=solveDirect(edges, n, m);
        if ((Double)tempRes[0]>(Double)res[0]) res=tempRes;
        
        edges.clear();
        edges.add(new Point(0, 0));
        edges.add(new Point(n, m));
        edges.add(new Point(0, m));
        edges.add(new Point(n, 0));
        tempRes=solveDirect(edges, n, m);
        if ((Double)tempRes[0]>(Double)res[0]) res=tempRes;
        
        return res;
    }

    Object[] solveDirect(ArrayList<Point> edges, int n, int m){
        
        Point[] diff = new Point[9];
        for (int i = 0; i < diff.length; i++) {
            diff[i] = new Point((i % 3)-1, (i / 3)-1);
        }
        ArrayList<Point> argmax = null;
        double max = 0;

        for (int t = 0; t < 9 * 9 * 9 * 9; t++) {
            int shiftInd = t;
            ArrayList<Point> al = new ArrayList<>();
            for (int i = 0; i < 4; i++) {
                al.add(sum(edges.get(i), diff[shiftInd % 9]));
                shiftInd/=9;
            }
            double temp = 0;
            if ((temp = length(al, n, m)) > max) {
                argmax = al;
                max = temp;
            }
        }
        return new Object[]{max,argmax};
    }
    
    void solve() throws IOException {

        InputStream in = System.in;
        PrintStream out = System.out;

//        in = new FileInputStream("in.txt");
//        out = new PrintStream("out.txt");

        Scanner sc = new Scanner(in);
        int n = sc.nextInt(),
                m = sc.nextInt();
        
        Object[] dir=defCornersSequenceSolve(n,m);
        
        //        inv=solveDirect(m,n);
        //if ((Double)dir[0]>(Double)inv[0])
            for (Point p:(ArrayList<Point>)dir[1])
                out.println(p.x+" "+p.y);
//        else
//            for (Point p:(ArrayList<Point>)inv[1])
//                out.println(p.y+" "+p.x);
    }
}