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 dr[] = {1, 0, -1, 0, 1, 1, -1, -1};
const int dc[] = {0, 1, 0, -1, 1, -1, -1, 1};
const double eps = 1e-9;
const int INF = 0x7FFFFFFF;
const long long INFLL = 0x7FFFFFFFFFFFFFFFLL;
const double pi = acos(-1);
template <class T>
T take(queue<T> &O) {
  T tmp = O.front();
  O.pop();
  return tmp;
}
template <class T>
T take(stack<T> &O) {
  T tmp = O.top();
  O.pop();
  return tmp;
}
template <class T>
T take(priority_queue<T> &O) {
  T tmp = O.top();
  O.pop();
  return tmp;
}
template <class T>
inline void getint(T &num) {
  bool neg = 0;
  num = 0;
  char c;
  while ((c = getchar_unlocked()) && (!isdigit(c) && c != '-'))
    ;
  if (c == '-') {
    neg = 1;
    c = getchar_unlocked();
  }
  do num = num * 10 + c - '0';
  while ((c = getchar_unlocked()) && isdigit(c));
  num *= (neg) ? -1 : 1;
}
void OPEN(string in = "input.txt", string out = "output.txt") {
  freopen(in.c_str(), "r", stdin);
  freopen(out.c_str(), "w", stdout);
  return;
}
int n, m, szc, szc2;
pair<int, int> cok[3005], cok2[3005];
pair<int, int> p1, p4, p2, p3;
pair<int, int> ans[4];
double tot(const pair<int, int> &A, const pair<int, int> &B,
           const pair<int, int> &C, const pair<int, int> &D) {
  return hypot(A.first - B.first, A.second - B.second) +
         hypot(B.first - C.first, B.second - C.second) +
         hypot(C.first - D.first, C.second - D.second);
}
bool valid(const pair<int, int> &A, const pair<int, int> &B,
           const pair<int, int> &C, const pair<int, int> &D) {
  return A != B && A != C && A != D && B != C && B != D && C != D;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  cin >> n >> m;
  p2 = make_pair(0, 0);
  p3 = make_pair(n, m);
  for (int(i) = (0), _t = (n); i <= (_t); ++(i)) {
    cok[szc++] = make_pair(i, m);
    cok2[szc2++] = make_pair(i, 0);
  }
  for (int(j) = (1), _t = (m - 1); j <= (_t); ++(j)) {
    cok[szc++] = make_pair(n, j);
    cok2[szc2++] = make_pair(0, j);
  }
  double ansl = -1;
  for (int(i) = (0), _t = (szc); i < (_t); ++(i)) {
    pair<int, int> &zz = cok[i];
    if (zz != p3) {
      double tmp = hypot(zz.first - p2.first, zz.second - p2.second);
      if (tmp > ansl) {
        ansl = tmp;
        p1 = cok[i];
      }
    }
  }
  ansl = -1;
  for (int(i) = (0), _t = (szc2); i < (_t); ++(i)) {
    pair<int, int> &zz = cok2[i];
    if (zz != p2) {
      double tmp = hypot(zz.first - p3.first, zz.second - p3.second);
      if (tmp > ansl) {
        ansl = tmp;
        p4 = cok2[i];
      }
    }
  }
  ansl = tot(p1, p2, p3, p4);
  ans[0] = p1;
  ans[1] = p2;
  ans[2] = p3;
  ans[3] = p4;
  p1 = make_pair(0, m);
  p4 = make_pair(n, 0);
  double tmp = tot(p1, p4, p3, p2);
  if (tmp > ansl && valid(p1, p2, p3, p4)) {
    ansl = tmp;
    ans[0] = p1;
    ans[1] = p4;
    ans[2] = p3;
    ans[3] = p2;
  }
  tmp = tot(p1, p4, p2, p3);
  if (tmp > ansl && valid(p1, p2, p3, p4)) {
    ansl = tmp;
    ans[0] = p1;
    ans[1] = p4;
    ans[2] = p2;
    ans[3] = p3;
  }
  for (int(i) = (0), _t = (4); i < (_t); ++(i))
    cout << ans[i].first << " " << ans[i].second << endl;
  return 0;
}