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.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.HashSet;
import java.io.InputStream;

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

class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int m = in.nextInt();

        HashSet<Point> points = new HashSet<Point>();

        for (int deltaX = -2; deltaX <= 2; ++deltaX) {
            for (int deltaY = -2; deltaY <= 2; ++deltaY) {
                Point p = new Point(0 + deltaX, 0 + deltaY);
                if (p.isValid(n, m)) {
                    points.add(p);
                }
                p = new Point(n + deltaX, 0 + deltaY);
                if (p.isValid(n, m)) {
                    points.add(p);
                }
                p = new Point(0 + deltaX, m + deltaY);
                if (p.isValid(n, m)) {
                    points.add(p);
                }
                p = new Point(n + deltaX, m + deltaY);
                if (p.isValid(n, m)) {
                    points.add(p);
                }
            }
        }

        Point[] best = new Point[0];
        double bestDst = 0;
        for (Point p1 : points) for (Point p2 : points) for (Point p3 : points) for (Point p4 : points) {
            if (!p1.equals(p2) && !p2.equals(p3) && !p1.equals(p3) && !p1.equals(p4) && !p2.equals(p4) && !p3.equals(p4)) {
                double cur = p1.dist(p2) + p2.dist(p3) + p3.dist(p4);
                if (DoubleUtils.compareTo(bestDst, cur) < 0) {
                    bestDst = cur;
                    best = new Point[]{p1, p2, p3, p4};
                }
            }
        }
        for (Point p : best) {
            out.println(p.toString());
        }
    }

    class Point {
        int x, y;

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

        public String toString() {
            StringBuilder b = new StringBuilder("");
            b.append(x).append(' ').append(y);
            return b.toString();
        }

        double dist(Point o) {
            return DoubleUtils.hypot(x - o.x, y - o.y);
        }

        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;
        }

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

        public boolean isValid(int n, int m) {
            return x >= 0 && y >= 0 && x <= n && y <= m;
        }
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer stt;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String nextLine() {
        try {
            return reader.readLine().trim();
        } catch (IOException e) {
            return null;
        }
    }

    public String nextString() {
        while (stt == null || !stt.hasMoreTokens()) {
            stt = new StringTokenizer(nextLine());
        }
        return stt.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

}

class DoubleUtils {
    public static final double EPS = 1e-11;

    public static double sqr(double x) {
        return x * x;
    }

    public static int compareTo(double a, double b) {
        if (doubleEqual(a, b)) {
            return 0;
        }
        if (a < b) {
            return -1;
        }
        return 1;
    }

    private static boolean doubleEqual(double a, double b) {
        return Math.abs(a - b) < EPS;
    }

    public static double sqrt(double a) {
        if (compareTo(a, 0) < 0) {
            System.exit(1);
        }
        if (a < 0) return 0;
        return Math.sqrt(a);
    }

    public static double hypot(double a, double b) {
        return sqrt(sqr(a) + sqr(b));
    }
}