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


public class Solution {
    boolean eof;
    BufferedReader br;
    StringTokenizer st;
    PrintWriter out;

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

    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                eof = true;
                return "-1";
            }
        }
        return st.nextToken();
    }

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

    public long nextLong() {
        return Long.parseLong(nextToken());
    }

    double nextDouble() {
        return Double.parseDouble(nextToken());
    }

    String nextLine() throws IOException {
        return br.readLine();
    }


    void run() throws IOException {
        InputStream input = System.in;
        PrintStream output = System.out;
        String name = "a";
        try {
            File f = new File(name + ".in");
            if (f.exists() && f.canRead()) {
                input = new FileInputStream(f);
                output = new PrintStream(name + ".out");
            }
        } catch (Throwable e) {
        }
        br = new BufferedReader(new InputStreamReader(input));
        out = new PrintWriter(output);
        solve();
        br.close();
        out.close();
    }


    boolean diff(int x1, int y1, int x2, int y2) {
        if ((x1 == x2) && (y1 == y2)) {
            return false;
        } else {
            return true;
        }
    }

    double le(int x1, int y1, int x2, int y2) {
        return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
    }

    double len(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) {
        return le(x1, y1, x2, y2) + le(x2, y2, x3, y3) + le(x3, y3, x4, y4);
    }

    void solve() {
        double ml = 0.0, l = 0.0;
        int n = nextInt(), m = nextInt();
        int x1 = 0, y1 = 0, x2 = n, y2 = m, x3 = 0, y3 = 0, x4 = 0, y4 = 0;
        if (n > m) {
            y3 = m;
            x4 = n;
        } else {
            x3 = n;
            y4 = m;
        }
        if (n * m > 0) {
            ml = len(x1, y1, x2, y2, x3, y3, x4, y4);
        }
        int dx = Math.min(2, n);
        int dy = Math.min(2, m);
        for (int i1 = 0; i1 <= dx; i1++) {
            for (int j1 = 0; j1 <= dy; j1++) {
                for (int i2 = n; i2 >= n - dx; i2--) {
                    for (int j2 = m; j2 >= m - dy; j2--) {
                        for (int i3 = 0; i3 <= dx; i3++) {
                            for (int j3 = 0; j3 <= dy; j3++) {
                                for (int i4 = n; i4 >= n - dx; i4--) {
                                    for (int j4 = m; j4 >= m - dy; j4--) {
                                        if (diff(i1, j1, i2, j2) &&
                                                diff(i1, j1, i3, j3) &&
                                                diff(i1, j1, i4, j4) &&
                                                diff(i2, j2, i3, j3) &&
                                                diff(i2, j2, i4, j4) &&
                                                diff(i3, j3, i4, j4)) {
                                            l = len(i1, j1, i2, j2, i3, j3, i4, j4);
                                            if (l > ml) {
                                                ml = l;
                                                x1 = i1;
                                                y1 = j1;
                                                x2 = i2;
                                                y2 = j2;
                                                x3 = i3;
                                                y3 = j3;
                                                x4 = i4;
                                                y4 = j4;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        out.println(x1 + " " + y1);
        out.println(x2 + " " + y2);
        out.println(x3 + " " + y3);
        out.println(x4 + " " + y4);
    }
}