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.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.HashSet;

public class Solution {

    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    public static void solve(InputStream inputStream, PrintStream outputStream) throws Exception {
        StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(inputStream)));
//		BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(outputStream));

        int n = readInteger(in);
        int m = readInteger(in);

        int[][] variants = {
                {0, 1, 0, m, 0, 0, 0, m - 1},
                {1, 0, n, 0, 0, 0, n - 1, 0},
                {0, 0, n, m, 0, m, n, 0},
                {0, 0, n, m, n, 0, 0, m},
                {n - 1, m, 0, 0, n, m, 1, 0},
                {n, m - 1, 0, 0, n, m, 0, 1},
        };

        HashSet<Point> set = new HashSet<Point>(4);

        int[] maxVariant = null;
        double maxD = -1d;
        loop:
        for (int[] variant : variants) {
            set.clear();
            Point prev = null;
            double d = 0;
            for (int i = 0; i + 1 < variant.length; i += 2) {
                Point point = new Point(variant[i], variant[i + 1]);
                if (point.x < 0 || point.y < 0) {
                    continue loop;
                }
                if (prev != null) {
                    d += length(point.x, point.y, prev.x, prev.y);
                }
                set.add(point);
                prev = point;
            }
            if (set.size() < 4) {
                d = -2d;
            }
            if (d > maxD) {
                maxVariant = variant;
                maxD = d;
            }
        }

        assert maxVariant != null;

        for (int i = 0; i + 1 < maxVariant.length; i += 2) {
            out.print(maxVariant[i]);
            out.print(' ');
            out.println(maxVariant[i + 1]);
        }

        out.flush();
    }

    private static double length(double x1, double y1, double x2, double y2) {
        double dx = x1 - x2;
        double dy = y1 - y2;
        return Math.sqrt(dx * dx + dy * dy);
    }

    public static final class Point {
        public final int x;
        public final int y;

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

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            Point point = (Point) o;

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

            return true;
        }

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

    private static double readDouble(StreamTokenizer in) throws Exception { in.nextToken(); return in.nval; }
    private static float readFloat(StreamTokenizer in) throws Exception { return (float) readDouble(in); }
    private static int readInteger(StreamTokenizer in) throws Exception { return (int) readDouble(in); }
    private static long readLong(StreamTokenizer in) throws Exception { return (long) readDouble(in); }
    private static byte readByte(StreamTokenizer in) throws Exception { return (byte) readDouble(in); }

}