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.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;


public class RoundMEMSQL_1_14_B {


    int n,m;
    
    public boolean isCorner(int i, int j){
        return i+j == 0 || i+j == n+m;
    }
    
    public double dist(double i1, double j1, double i2, double j2){
        return Math.sqrt((i1-i2)*(i1-i2) + (j1-j2)*(j1-j2));
    }
    
    public double get(int [][] ind){
        return 
                dist(ind[0][0], ind[0][1], ind[1][0], ind[1][1])
                + dist(ind[1][0], ind[1][1], ind[2][0], ind[2][1])
                + dist(ind[2][0], ind[2][1], ind[3][0], ind[3][1])
                ;
    }
    
    public void solve()throws Exception{
        InputReader in = new InputReader();
        n = in.nextInt();
        m = in.nextInt();
        
        double max = 0;
        int[][] ans = new int[2][2];
        for(int i =0;i <= n;i++){
            for(int j =0;j <= m;j++){
                int i1 = n- i;
                int j1 = m-j;
                if(isCorner(i,j) || isCorner(i1,j1) || (i == i1 && j == j1)){
                    continue;
                }
                int[][] val = new int[][]{{i,j},{0,0},{n,m},{i1,j1}};
                double tmp = get(val);
                if(tmp > max){
                    max = tmp;
                    ans = val;
                }
                
                val = new int[][]{{i1,j1},{0,0},{n,m},{i,j}};
                tmp = get(val);
                if(tmp > max){
                    max = tmp;
                    ans = val;
                }
                
                val = new int[][]{{i,j},{i1,j1},{0,0},{n,m}};
                tmp = get(val);
                if(tmp > max){
                    max = tmp;
                    ans = val;
                }
                val = new int[][]{{i,j},{i1,j1},{n,m},{0,0}};
                tmp = get(val);
                if(tmp > max){
                    max = tmp;
                    ans = val;
                }
            }
        }
        StringBuffer ret = new StringBuffer();
        for(int i=0;i < 4;i++)
            ret.append(ans[i][0] + " " + ans[i][1] + '\n');
        System.out.print(ret);
    }
    
    
    public static void main(String[] args) throws Exception{
        new RoundMEMSQL_1_14_B().solve();
    }

    static class InputReader {
        BufferedReader in;
        StringTokenizer st;

        public InputReader() throws IOException {
            in = new BufferedReader(new InputStreamReader(System.in));
            st = new StringTokenizer(in.readLine());

        }

        public String next() throws IOException {

            while (!st.hasMoreElements())
                st = new StringTokenizer(in.readLine());
            return st.nextToken();
        }

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

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

}