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 Main implements Runnable {
    BufferedReader in;
    PrintWriter out;
    StringTokenizer st;

    String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    long nextLong() throws IOException{
        return Long.parseLong(nextToken());
    }

    class Point implements Comparable<Point> {
        int x, y;
        Point(int q, int w) {
            x = q; y = w;
        }

        @Override
        public int compareTo(Point o) {
            if (x == o.x) return y - o.y;
            return x - o.x;
        }
    }

    double dist(Point a, Point b) {
        return Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
    }

    int n, m;

    double f(ArrayList<Point> a) {
        TreeSet<Point> ts = new TreeSet<Point>();
        for (Point anA : a) {
            if (anA.x < 0 || anA.y < 0) return -1e30;
            if (anA.x > n || anA.y > m) return -1e30;
            if (ts.contains(anA)) return -1e30;
            ts.add(anA);
        }
        double res = 0;
        for (int i = 0; i < a.size() - 1; i++) {
            res += dist(a.get(i), a.get(i + 1));
        }
        return res;
    }

    void solve() throws IOException {
        n = nextInt();
        m = nextInt();
        if (n == 1 && m == 1) {
            out.println("0 0\n1 1\n0 1\n1 0");
            return;
        }
        ArrayList<Point>[] a = new ArrayList[6];
        for (int i = 0; i < 6; i++) {
            a[i] = new ArrayList<Point>();
        }
        a[0].add(new Point(0, 1));
        a[1].add(new Point(0, 1));
        a[2].add(new Point(1, 0));
        a[3].add(new Point(1, 0));
        for (int i = 0; i < 4; i++) {
            a[i].add(new Point(n, m));
            a[i].add(new Point(0, 0));
        }
        a[0].add(new Point(n, m - 1));
        a[1].add(new Point(n - 1, m));
        a[2].add(new Point(n, m - 1));
        a[3].add(new Point(n - 1, m));
        a[4].add(new Point(0, 0));
        a[4].add(new Point(n, m));
        a[4].add(new Point(0, m));
        a[4].add(new Point(n, 0));
        a[5].add(new Point(0, 0));
        a[5].add(new Point(n, m));
        a[5].add(new Point(n, 0));
        a[5].add(new Point(0, m));
        int qq = -1;
        double rr = -1e30;
        for (int i = 0; i < 6; i++) {
            double qw = f(a[i]);
            if (qw > rr) {
                rr = qw; qq = i;
            }
        }
        for (int i = 0; i < 4; i++) {
            out.println(a[qq].get(i).x + " " + a[qq].get(i).y);
        }
    }

    public void run() {
        try {
//            in = new BufferedReader(new FileReader("input.txt"));
//            out = new PrintWriter("output.txt");
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            Locale.setDefault(Locale.UK);
//            for (int tt = nextInt(); tt > 0; tt--)
            solve();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        } finally {
            out.close();
        }
    }

    public static void main(String Args[]) {
        new Thread(null, new Main(), "1", 1 << 28).start();
    }
}