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;
long long x, y, d;
template <class T>
inline T gcd(T a, T b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
template <class T>
inline T extended_euclid_returning_gcd(T a, T b) {
  if (b == 0) {
    d = a;
    x = 1;
    y = 0;
  } else {
    extended_euclid_returning_gcd(b, a % b);
    T x1 = y;
    T y1 = x - (a / b) * y;
    x = x1;
    y = y1;
  }
}
template <class T>
inline T absolute(T a) {
  if (a > 0)
    return a;
  else
    return -a;
}
template <class T>
inline T reverse_num(T a) {
  T x = 0, tmp = a;
  while (tmp) {
    x = 10 * x + tmp % 10;
    tmp /= 10;
  }
  return x;
}
template <class T>
inline T big_mod(T base, T power) {
  T res = 1;
  while (power) {
    if (power & 1) {
      res *= base;
      power--;
    }
    base = base * base;
    power /= 2;
  }
  return res;
}
struct point {
  int x, y;
  point(int a, int b) {
    x = a;
    y = b;
  }
  bool operator<(const point &a) const {
    if (x == a.x && y == a.y) return false;
    return true;
  }
};
vector<point> critical;
set<point> ritical;
double dis(int i, int j) {
  return sqrt(
      (critical[i].x - critical[j].x) * (critical[i].x - critical[j].x) +
      (critical[i].y - critical[j].y) * (critical[i].y - critical[j].y));
}
int main() {
  int n, m;
  cin >> n >> m;
  if (n == 0) {
    printf("0 1\n0 %d\n0 0\n0 %d\n", m, m - 1);
  } else if (m == 0) {
    printf("1 0\n%d 0\n0 0\n%d 0\n", n, n - 1);
  } else {
    ritical.insert(point(0, 0));
    ritical.insert(point(n, m));
    ritical.insert(point(0, m));
    ritical.insert(point(n, 0));
    ritical.insert(point(0, 1));
    ritical.insert(point(1, 0));
    ritical.insert(point(n, m - 1));
    ritical.insert(point(n - 1, m));
    ritical.insert(point(0, m - 1));
    ritical.insert(point(n - 1, 0));
    ritical.insert(point(1, m));
    ritical.insert(point(n, 1));
    for (set<point>::iterator it = ritical.begin(); it != ritical.end(); it++) {
      critical.push_back(*it);
    }
    ritical.clear();
    int ans1, ans2, ans3, ans4;
    double maxi = -19999;
    for (int i = 0; i < critical.size(); i++) {
      for (int j = 0; j < critical.size(); j++) {
        for (int k = 0; k < critical.size(); k++) {
          for (int l = 0; l < critical.size(); l++) {
            ritical.insert(critical[i]);
            ritical.insert(critical[j]);
            ritical.insert(critical[k]);
            ritical.insert(critical[l]);
            double totalDist = dis(i, j) + dis(j, k) + dis(k, l);
            if (totalDist > maxi && ritical.size() == 4) {
              maxi = totalDist;
              ans1 = i;
              ans2 = j;
              ans3 = k;
              ans4 = l;
            }
            ritical.clear();
          }
        }
      }
    }
    printf("%d %d\n", critical[ans1].x, critical[ans1].y);
    printf("%d %d\n", critical[ans2].x, critical[ans2].y);
    printf("%d %d\n", critical[ans3].x, critical[ans3].y);
    printf("%d %d\n", critical[ans4].x, critical[ans4].y);
  }
  return 0;
}