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.util.Scanner;
import java.io.IOException;
import java.io.PrintStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.AbstractCollection;
import java.util.LinkedList;
import java.util.Collection;
import java.io.InputStream;

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

class TaskB {

    class P {
        int x;
        int y;

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

        public String toString() {
            return "P{" +
                    "x=" + x +
                    ", y=" + y +
                    '}';
        }
    }

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

        LinkedList<P> ps = new LinkedList<>();
        for (int i = 0; i <= n; i++) {
            if (i != 0) {
                P p1 = new P(i, 0);
                ps.add(p1);
            }

            if (i != n) {
                P p2 = new P(i, m);
                ps.add(p2);
            }
        }
        for (int i = 0; i <= m; i++) {
            if (i != 0) {
                P p1 = new P(0, i);
                ps.add(p1);
            }

            if (i != m) {
                P p2 = new P(n, i);
                ps.add(p2);
            }
        }

        LinkedList<P> rm = new LinkedList<>();
        for (P p : ps) {
            if (p.x == 0 && p.y == 0) rm.add(p);
            if (p.x == n && p.y == m) rm.add(p);
        }
        ps.removeAll(rm);

        System.err.printf("%s\n", ps);

        LinkedList<P> nm = new LinkedList<>();
        nm.add(new P(n, m));
        LinkedList<P> ze = new LinkedList<>();
        ze.add(new P(0, 0));

        find(ps, nm, ze, ps);
        find(nm, ze, ps, ps);

        for (P p : besp) {
            out.printf("%d %d\n", p.x, p.y);
        }
    }

    double best = 0;
    P[] besp = new P[4];

    void find(LinkedList<P> ps1, LinkedList<P> ps2, LinkedList<P> ps3, LinkedList<P> ps4) {
        for (P p1 : ps1) {
            for (P p2 : ps2) {
                for (P p3 : ps3) {
                    for (P p4 : ps4) {
                        double tot = dist(p1, p2) + dist(p2, p3) + dist(p3, p4);
                        if (best < tot) {
                            besp = new P[]{p1, p2, p3, p4};
                            best = tot;
                        }
                    }
                }
            }
        }
    }

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