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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x, y;
  Point(int x, int y) : x(x), y(y){};
  inline friend bool operator==(const Point &A, const Point &B) {
    return (A.x == B.x && A.y == B.y);
  }
};
int n, m;
vector<Point> rubne;
vector<Point> rjesenje;
void Insert(Point p) { rubne.push_back(p); }
int dist(Point a, Point b) {
  int ret;
  ret = (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
  return ret;
}
vector<Point> New(Point a, Point b, Point c, Point d) {
  vector<Point> ret;
  ret.push_back(a);
  ret.push_back(b);
  ret.push_back(c);
  ret.push_back(d);
  return ret;
}
bool valja(Point a) {
  if (a.x < 0 || a.y < 0) return false;
  if (a.x > n || a.y > m) return false;
  return true;
}
int main() {
  scanf("%d %d", &n, &m);
  Insert(Point(0, 0));
  Insert(Point(1, 0));
  Insert(Point(0, 1));
  Insert(Point(n, 0));
  Insert(Point(n - 1, 0));
  Insert(Point(n, 1));
  Insert(Point(0, m));
  Insert(Point(0, m - 1));
  Insert(Point(1, m));
  Insert(Point(n, m));
  Insert(Point(n - 1, m));
  Insert(Point(n, m - 1));
  int maxi = 0;
  for (int i = 0; i < (int)rubne.size(); i++) {
    if (!valja(rubne[i])) continue;
    for (int j = 0; j < (int)rubne.size(); j++) {
      if (rubne[j] == rubne[i]) continue;
      if (!valja(rubne[j])) continue;
      for (int ii = 0; ii < (int)rubne.size(); ii++) {
        if (rubne[ii] == rubne[i] || rubne[ii] == rubne[j]) continue;
        if (!valja(rubne[ii])) continue;
        for (int jj = 0; jj < (int)rubne.size(); jj++) {
          if (rubne[jj] == rubne[i] || rubne[jj] == rubne[j] ||
              rubne[jj] == rubne[ii])
            continue;
          if (!valja(rubne[jj])) continue;
          int udalj = dist(rubne[i], rubne[j]) + dist(rubne[j], rubne[ii]) +
                      dist(rubne[ii], rubne[jj]);
          if (udalj > maxi) {
            maxi = udalj;
            rjesenje = New(rubne[i], rubne[j], rubne[ii], rubne[jj]);
          }
        }
      }
    }
  }
  for (int i = 0; i < rjesenje.size(); i++) {
    printf("%d %d\n", rjesenje[i].x, rjesenje[i].y);
  }
  return 0;
}