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.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class CF {public static void main(String[] args) throws Exception {new Solve();}}

class Solve { public Solve() throws Exception{solve();}
    void solve() throws Exception {
        int n = NI();
        int m = NI();
        switch (min(n, m)) {
            case 0:
                if (n == 0) {
                    System.out.println("0 1\n0 " + m + "\n0 0\n0 " + (m - 1));
                } else {
                    System.out.println("1 0\n" + n + " 0\n0 0\n" + (n - 1) + " 0");
                }
                break;
            case 1:
                if (n > m)
                    System.out.println("0 0\n" + n + " " + m + "\n0 " + m + "\n" + n + " 0");
                else
                    System.out.println("0 0\n" + n + " " + m + "\n" + n + " 0\n0 " + m);
                break;
            default:
                double diag = Math.sqrt(n * n + m * m);
                double[] q = new double[]{
                        diag + 2 * Math.sqrt(n * n + (m - 1) * (m - 1)),
                        diag + 2 * Math.sqrt((n - 1) * (n - 1) + m * m),
                        2 * diag + max(m, n)
                };
                double max = 0;
                int ind = -1;
                for (int i = 0; i < 3; i++) {
                    if (q[i] > max) {
                        max = q[i];
                        ind = i;
                    }
                }
                switch (ind) {
                    case 0:
                        System.out.println("0 " + (m - 1) + " \n" + n + " 0\n0 " + m + "\n" + n + " 1");
                        break;
                    case 1:
                        System.out.println((n - 1) + " " + m + "\n0 0\n" + n + " " + m + "\n1 0");
                        break;

                    case 2:
                        if (n > m)
                            System.out.println("0 0\n" + n + " " + m + "\n0 " + m + "\n" + n + " 0");
                        else
                            System.out.println("0 0\n" + n + " " + m + "\n" + n + " 0\n0 " + m);
                }
            }
    }

    final int INF = Integer.MAX_VALUE;
    final long LINF = Long.MAX_VALUE;
    void inInt(int[]a,int n)throws Exception{for(int i=0;i<n;i++)a[i]=NI();}
    void inLong(long[]a,int n)throws Exception{for(int i=0;i<n;i++)a[i]=NL();}
    BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st=new StringTokenizer("");
    int min(int i1,int i2){return i1<i2?i1:i2;}
    long min(long i1,long i2){return i1<i2?i1:i2;}
    int max(int i1,int i2){return i1>i2?i1:i2;}
    long max(long i1,long i2){return i1>i2?i1:i2;}
    String NS()throws Exception{while(!st.hasMoreTokens())st=new StringTokenizer(stdin.readLine());return st.nextToken();}
    String NLn()throws Exception{return stdin.readLine();}
    int NI()throws Exception{return Integer.parseInt(NS());}
    long NL()throws Exception{return Long.parseLong(NS());}
    double ND()throws Exception{return Double.parseDouble(NS());}
    int abs(int x){return x<0?-x:x;}
    long abs(long x){return x<0?-x:x;}
    int mod(int x,int mod){return(x+mod)%mod;}
}
class ArrayUtils{public static void mergeSort(long[]a){long[]src=a.clone();mergeSortInt(src, a, 0, a.length);}
    public static void mergeSortInt(long[]src,long[]dest,int low,int high) {
        int length = high - low;
        if(length == 1) return;
        if (length == 2) {
            if(dest[low] > dest[high-1]){long t = dest[low];dest[low] = dest[high-1];dest[high-1] = t;}
            return;}
        int mid=(low+high)>>>1;
        mergeSortInt(dest,src,low,mid);
        mergeSortInt(dest,src,mid,high);
        for(int i=low,p=low,q=mid;i<high;i++)if(q>=high||p<mid&&src[p]<=src[q])dest[i]=src[p++];else dest[i] = src[q++];}}