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:
//package codeforces;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;

public class B {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer = new PrintWriter(System.out);
    StringTokenizer stringTokenizer;

    B() throws IOException {
//        reader = new BufferedReader(new FileReader("cycle2.in"));
//        writer = new PrintWriter(new FileWriter("cycle2.out"));
    }

    String next() throws IOException {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            stringTokenizer = new StringTokenizer(reader.readLine());
        }
        return stringTokenizer.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    int[][] mul(int[][] a, int[][] b) {
        int[][] result = new int[2][2];
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < 2; j++) {
                for (int k = 0; k < 2; k++) {
                    result[i][j] = sum(result[i][j], product(a[i][k], b[k][j]));
                }
            }
        }
        return result;
    }

    int[][] pow(int[][] a, int k) {
        int[][] result = {{1, 0}, {0, 1}};
        while (k > 0) {
            if (k % 2 == 1) {
                result = mul(result, a);
            }
            a = mul(a, a);
            k /= 2;
        }
        return result;
    }

    final int MOD = 1000 * 1000 * 1000 + 7;

    int sum(int a, int b) {
        a += b;
        return a >= MOD ? a - MOD : a;
    }

    int product(int a, int b) {
        return (int) (1l * a * b % MOD);
    }

    @SuppressWarnings("unchecked")
    void solve() throws IOException {
        int n = nextInt(), m = nextInt();
        class Point {
            int x, y;

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

            double distTo(Point p) {
                int dx = x - p.x;
                int dy = y - p.y;
                return Math.sqrt(dx * dx + dy * dy);
            }

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

            @Override
            public String toString() {
                return x + " " + y;
            }
        }
        Set<Point> points = new HashSet<>();
        for(int i = 0; i < 2; i++) {
            for(int j = 0; j < 2; j++) {
                if(i <= n && j <= m) {
                    points.add(new Point(i, j));
                }
                if(n - i >= 0 && m - j >= 0) {
                    points.add(new Point(n - i, m - j));
                }
                if(i <= n && m - j >= 0) {
                    points.add(new Point(i, m - j));
                }
                if(n - i >= 0 && j <= m) {
                    points.add(new Point(n - i, j));
                }
            }
        }
        final Point[] p = points.toArray(new Point[points.size()]);
        final Point[] answer = new Point[4];
        class Utils {
            double bestDist = 0;
            Point[] points = new Point[4];
            void rec(int used, int k) {
                if(k == 4) {
                    double dist = 0;
                    for(int i = 1; i < 4; i++) {
                        dist += points[i].distTo(points[i - 1]);
                    }
                    if(bestDist < dist) {
                        bestDist = dist;
                        System.arraycopy(points, 0, answer, 0, 4);
                    }
                    return;
                }
                for(int i = 0; i < p.length; i++) {
                    if((used >> i) % 2 == 0) {
                        points[k] = p[i];
                        rec(used + (1 << i), k + 1);
                    }
                }
            }
        }
        new Utils().rec(0, 0);
        for (Point point : answer) {
            writer.println(point);
        }
        writer.close();
    }

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

}