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.HashSet;
import java.util.Scanner;
import java.util.Vector;


public class B {
  public static final boolean DEBUG = false;
  Scanner sc;
  

class Point {
   int x;
   int y;
   
   public Point(int x, int y) {
      this.x = x;
      this.y = y;
   }
   
   @Override
   public int hashCode() {
      return x*10001 + y;
   }
   
   @Override
   public boolean equals(Object o) {
      if (o instanceof Point) {
         Point p = (Point)o;
         return x==p.x && y==p.y;
      }
      return false;
   }
   
   
   double dist(Point p) {
      return Math.sqrt((x-p.x)*(x-p.x) + (y-p.y)*(y-p.y));
   }
   public String toString() {
      return String.format("%d %d", x, y);
   }
}

  
  public void debug(Object o) {
    if (DEBUG) {
      int ln = Thread.currentThread().getStackTrace()[2].getLineNumber();
      String fn = Thread.currentThread().getStackTrace()[2].getFileName();
      System.out.println("(" + fn + ":" + ln+ "): " + o);
    }
  }
  
  public void pln(Object o) {
    System.out.println(o);
  }
  
  public void addPoint(HashSet<Point> points, int i, int j, int n, int m) {
     if (i>=0 && i<=n && j>=0 && j<=m)
        points.add(new Point(i, j));
  }
  
  public void run() {
    sc = new Scanner(System.in);    
    int n = sc.nextInt();
    int m = sc.nextInt();
    
    HashSet<Point> points = new HashSet<Point>();
    
    for (int i=0; i<4; i++) {
       for (int j=0; j<4; j++) {
          addPoint(points, i, j, n, m);
          addPoint(points, i, m-j, n, m);
          addPoint(points, n-i, m, n, m);
          addPoint(points, n-i, m-j, n, m);
       }
    }
    Vector<Point> bestSet = null;
    double bestScore = -1;
    for (Point p1: points) {
       for (Point p2: points) {
          if (p1 == p2) continue;
          for (Point p3: points) {
             if (p1 == p3 || p2 == p3) continue;
             for (Point p4: points) {
                if (p1 == p4 || p2 == p4 || p3 == p4) continue;
                
                double score = p1.dist(p2) + p2.dist(p3) + p3.dist(p4);
                if (score > bestScore) {
                   bestScore = score;
                   bestSet = new Vector<Point>();
                   bestSet.add(p1); bestSet.add(p2); bestSet.add(p3); bestSet.add(p4);
                }
             }
          }
       }
    }
    
    for (Point p: bestSet) {
       System.out.println(p);
    }
    return;
    
  }
  public static void main(String[] args) {
    B t = new B();
    t.run();
  }
}