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.*;
import static java.lang.Math.*;
import java.lang.reflect.*;
import java.math.BigInteger;
import static java.math.BigInteger.*;
import java.security.CodeSource;
import java.security.KeyStore;
import java.util.*;
import static java.util.Arrays.*;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.logging.Logger;

// https://netbeans.org/kb/73/java/editor-codereference_ru.html#display
public class Main {
    //<editor-fold defaultstate="collapsed" desc="Your Fold Super Code">

    private void run() {
        Locale.setDefault(Locale.US);
        boolean oj = true;
        try {
            oj = System.getProperty("MYLOCAL") == null;
        } catch (Exception e) {
        }

        if (oj) {
            sc = new FastScanner(new InputStreamReader(System.in));
            out = new PrintWriter(new OutputStreamWriter(System.out));
        } else {
            try {
                sc = new FastScanner(new FileReader("input.txt"));
                out = new PrintWriter(new FileWriter("output.txt"));
            } catch (IOException e) {
                MLE();
            }
        }
        solve();
        //if( oj )
        err.println("Time: " + (System.currentTimeMillis() - timeBegin) / 1e3);
        out.flush();
    }

    private void show(int[] arr) {
        for( int v : arr ) err.print( " " + v );
        err.println();
    }

    private boolean eq(String a, String b) {
        for( int i = 0; i < a.length(); ++i ){
            if( a.charAt(i) == '.' ) continue;
            if( b.charAt(i) == '.' ) continue;
            if( a.charAt(i) != b.charAt(i) )
                return false;
        }
        return true;
    }



    class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStreamReader reader) {
            br = new BufferedReader(reader);
            st = new StringTokenizer("");
        }

        String next() {
            while (!st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException ex) {
                    Main.MLE();
                }
            }
            return st.nextToken();
        }

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

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

    public static void MLE() {
        int[][] arr = new int[1024 * 1024][];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = new int[1024 * 1024];
        }
    }

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

    long timeBegin = System.currentTimeMillis();
    FastScanner sc;
    PrintWriter out;
    PrintStream err = System.err;

    // </editor-fold>
    
    
    class Pt implements Comparable<Pt>{
        int x, y;
        
        Pt( int _x, int _y ){
            x = _x;
            y = _y;
        }

        @Override
        public int compareTo(Pt p) {
            int rez = x - p.x;
            if( rez != 0 )
                return rez;
            return y - p.y;
        }

        private double dist(Pt b) {
            return sqrt( sq(x-b.x) + sq(y-b.y) );
        }
        
        double sq( int x ){ return x*x; }
        
    }
    
    int n, m;
    TreeSet<Pt> ts;

    void add(int i, int j) {
        for (int di = -2; di <= 2; di++) {
        for (int dj = -2; dj <= 2; dj++) {
            int ii = i + di;
            int jj = j + dj;
            if( 0 <= ii && ii <= n && 
                0 <= jj && jj <= m )
                ts.add( new Pt(ii, jj) );
        }
        }
    }
    
    void solve() {
        n = sc.nextInt();
        m = sc.nextInt();
        ts = new TreeSet<>();
        add( 0,0 );
        add( n,0 );
        add( 0,m );
        add( n,m );
        
        double ans = 0;
        Pt[] ansPt = null;
        for (Pt a : ts) {
        for (Pt b : ts) {
            if( a.equals(b) ) continue;
        for (Pt c : ts) {
            if( a.equals(c) ) continue;
            if( b.equals(c) ) continue;
        for (Pt d : ts) {
            if( a.equals(d) ) continue;
            if( b.equals(d) ) continue;
            if( c.equals(d) ) continue;
            
            double dist = a.dist(b) + b.dist(c) + c.dist(d);
            if( ans < dist ){
                ans = dist;
                ansPt = new Pt[]{a,b,c,d};
            }
        }
        }
        }
        }
        for( Pt p : ansPt ){
            out.printf( "%d %d\n", p.x, p.y );
        }
    }

}