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.util.Arrays;
import java.util.ArrayList;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.List;
import java.math.BigInteger;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author shu_mj @ http://shu-mj.com
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
    Scanner in;
    PrintWriter out;

    public void solve(int testNumber, Scanner in, PrintWriter out) {
        this.in = in;
        this.out = out;
        run();
    }

    void run() {
        int n = in.nextInt();
        int m = in.nextInt();
        double dis = 0;
        P[] ps = null;
        if (n != 0) {
            ps = max(ps, new P[] {new P(n - 1, m), new P(0, 0), new P(n, m), new P(1, 0)});
        }
        if (m != 0) {
            ps = max(ps, new P[] {new P(n, m - 1), new P(0, 0), new P(n, m), new P(0, 1)});
        }
        if (n != 0 && m != 0) {
            ps = max(ps, new P[] {new P(n - 1, m), new P(0, 0), new P(n, m), new P(0, 1)});
            ps = max(ps, new P[] {new P(n, m - 1), new P(0, 0), new P(n, m), new P(1, 0)});
            ps = max(ps, new P[] {new P(0, 0), new P(n, m), new P(0, m), new P(n, 0)});
            ps = max(ps, new P[] {new P(0, 0), new P(n, m), new P(n, 0), new P(0, m)});
        }
        for (P p : ps) {
            out.printf("%.0f %.0f%n", p.x, p.y);
        }
    }

    private P[] max(P[] ps, P[] qs) {
        if (ps == null) return qs;
        if (qs == null) return ps;
        if (!fit(ps)) return qs;
        if (!fit(qs)) return ps;
        if (dis(ps) < dis(qs)) return qs;
        return ps;
    }

    private double dis(P[] ps) {
        return ps[1].sub(ps[0]).abs() + ps[2].sub(ps[1]).abs() + ps[3].sub(ps[2]).abs();
    }

    private boolean fit(P[] ps) {
        for (int i = 0; i < ps.length; i++) {
            for (int j = i + 1; j < ps.length; j++) {
                if (ps[i].compareTo(ps[j]) == 0) return false;
            }
        }
        return true;
    }

}

class Scanner {
    BufferedReader br;
    StringTokenizer st;

    public Scanner(InputStream in) {
        br = new BufferedReader(new InputStreamReader(in));
        eat("");
    }

    private void eat(String s) {
        st = new StringTokenizer(s);
    }

    public String nextLine() {
        try {
            return br.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    public boolean hasNext() {
        while (!st.hasMoreTokens()) {
            String s = nextLine();
            if (s == null)
                return false;
            eat(s);
        }
        return true;
    }

    public String next() {
        hasNext();
        return st.nextToken();
    }

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

}

class P implements Comparable<P> {
    public static final double EPS = 1e-8;
    public static double add(double a, double b) {
        if (Math.abs(a + b) < EPS * (Math.abs(a) + Math.abs(b))) return 0;
        return a + b;
    }

    public final double x, y;

    public P(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public P sub(P p) {
        return new P(add(x, -p.x), add(y, -p.y));
    }

    public double dot(P p) {
        return add(x * p.x, y * p.y);
    }

    public double abs() {
        return Math.sqrt(abs2());
    }

    public double abs2() {
        return dot(this);
    }

    public String toString() {
        return "(" + x + ", " + y + ")";
    }

    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        return compareTo((P) obj) == 0;
    }

    public int compareTo(P p) {
        int b = sig(x - p.x);
        if (b != 0) return b;
        return sig(y - p.y);
    }

    public static int sig(double x) {
        if (Math.abs(x) < EPS) return 0;
        return x < 0 ? -1 : 1;
    }

}