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;
double f(pair<int, int> p1, pair<int, int> p2) {
  int dx = p1.first - p2.first;
  int dy = p1.second - p2.second;
  return hypot(dx, dy);
}
int main() {
  int n, m;
  while (cin >> n >> m) {
    set<pair<int, int> > S;
    int x0[2] = {0, n};
    int y0[2] = {0, m};
    for (int i = 0; i < 2; i++) {
      for (int dx = -3; dx <= 3; dx++) {
        for (int dy = -3; dy <= 3; dy++) {
          int xx = x0[i] + dx;
          int yy = y0[i] + dy;
          if (xx >= 0 && xx <= n && yy >= 0 && yy <= m)
            S.insert(make_pair(xx, yy));
        }
      }
    }
    vector<pair<int, int> > v(S.begin(), S.end());
    double maxD = 0;
    int ii1, ii2, ii3, ii4;
    for (int i1 = 0; i1 < v.size(); i1++) {
      for (int i2 = 0; i2 < v.size(); i2++) {
        for (int i3 = 0; i3 < v.size(); i3++) {
          for (int i4 = 0; i4 < v.size(); i4++) {
            if (i1 != i2 && i1 != i3 && i1 != i4 && i2 != i3 && i2 != i4 &&
                i3 != i4) {
              double d = f(v[i1], v[i2]) + f(v[i2], v[i3]) + f(v[i3], v[i4]);
              if (d > maxD) {
                maxD = d;
                ii1 = i1;
                ii2 = i2;
                ii3 = i3;
                ii4 = i4;
              }
            }
          }
        }
      }
    }
    cout << v[ii1].first << " " << v[ii1].second << endl;
    cout << v[ii2].first << " " << v[ii2].second << endl;
    cout << v[ii3].first << " " << v[ii3].second << endl;
    cout << v[ii4].first << " " << v[ii4].second << endl;
  }
  return 0;
}