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;
const int N = 1e6 + 6;
pair<int, int> res[4];
pair<int, int> ans[4];
double sqr(double x) { return x * x; }
void br(int n, int m) {
  double lans = -1;
  for (int x1 = 0; x1 <= n; ++x1)
    for (int y1 = 0; y1 <= m; ++y1)
      for (int x2 = 0; x2 <= n; ++x2)
        for (int y2 = 0; y2 <= m; ++y2)
          if (x2 != x1 || y2 != y1)
            for (int x3 = 0; x3 <= n; ++x3)
              for (int y3 = 0; y3 <= m; ++y3)
                if ((x3 != x1 || y3 != y1) && (x3 != x2 || y3 != y2))
                  for (int x4 = 0; x4 <= n; ++x4)
                    for (int y4 = 0; y4 <= m; ++y4)
                      if ((x4 != x1 || y4 != y1) && (x4 != x2 || y4 != y2) &&
                          (x4 != x3 || y4 != y3)) {
                        double len = sqrt(sqr(x2 - x1) + sqr(y2 - y1));
                        len += sqrt(sqr(x3 - x2) + sqr(y3 - y2));
                        len += sqrt(sqr(x4 - x3) + sqr(y4 - y3));
                        if (lans < len) {
                          lans = len;
                          ans[0] = make_pair(x1, y1);
                          ans[1] = make_pair(x2, y2);
                          ans[2] = make_pair(x3, y3);
                          ans[3] = make_pair(x4, y4);
                        }
                      }
}
double leng(pair<int, int> *p) {
  double l = 0;
  for (int i = 1; i < 4; ++i) {
    l += sqrt(sqr(p[i].first - p[i - 1].first) +
              sqr(p[i].second - p[i - 1].second));
  }
  return l;
}
int main() {
  int n, m;
  cin >> n >> m;
  if (n == 0) {
    res[0] = make_pair(0, 1);
    res[1] = make_pair(0, m);
    res[2] = make_pair(0, 0);
    res[3] = make_pair(0, m - 1);
  } else if (m == 0) {
    res[0] = make_pair(1, 0);
    res[1] = make_pair(n, 0);
    res[2] = make_pair(0, 0);
    res[3] = make_pair(n - 1, 0);
  } else if (n < m) {
    if (sqrt(n * n + m * m) * 2 + m >
        sqrt(n * n + m * m) + 2 * sqrt((n - 1) * (n - 1) + m * m)) {
      res[0] = make_pair(0, 0);
      res[1] = make_pair(n, m);
      res[2] = make_pair(n, 0);
      res[3] = make_pair(0, m);
    } else {
      res[0] = make_pair(1, 0);
      res[1] = make_pair(n, m);
      res[2] = make_pair(0, 0);
      res[3] = make_pair(n - 1, m);
    }
  } else {
    if (sqrt(n * n + m * m) * 2 + n >
        sqrt(n * n + m * m) + 2 * sqrt((m - 1) * (m - 1) + n * n)) {
      res[0] = make_pair(n, m);
      res[1] = make_pair(0, 0);
      res[2] = make_pair(n, 0);
      res[3] = make_pair(0, m);
    } else {
      res[0] = make_pair(0, 1);
      res[1] = make_pair(n, m);
      res[2] = make_pair(0, 0);
      res[3] = make_pair(n, m - 1);
    }
  }
  for (int i = 0; i < 4; ++i)
    cout << res[i].first << ' ' << res[i].second << endl;
  return 0;
}