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 double eps = 1e-10;
const double PI = atan(1.0) * 4;
const int inf = 2147483647 / 2;
template <class T>
bool chmin(T &a, const T &b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool chmax(T &a, const T &b) {
  return b > a ? a = b, 1 : 0;
}
template <class T>
int sgn(T first) {
  return (first > eps) - (first < -eps);
}
double dis(pair<int, int> a, pair<int, int> b) {
  return sqrt(((a.first - b.first) * (a.first - b.first)) +
              ((a.second - b.second) * (a.second - b.second)) + 0.0);
}
double calc(const vector<pair<int, int> > &v) {
  double ret = 0;
  for (int i = (1); i <= (int)(3); i++) ret += dis(v[i], v[i - 1]);
  return ret;
}
struct nod {
  vector<pair<int, int> > v;
  bool operator<(const nod &t) const { return calc(v) < calc(t.v); }
  void init(int n, int m) {
    v.resize(4);
    vector<pair<int, int> > tmp;
    tmp.resize(4);
    tmp[0] = make_pair(0, 0);
    tmp[1] = make_pair(n, m);
    tmp[2] = make_pair(0, m);
    tmp[3] = make_pair(n, 0);
    if (m != 1) {
      v[0] = make_pair(0, 1);
      v[1] = make_pair(n, m);
      v[2] = make_pair(0, 0);
      v[3] = make_pair(n, m - 1);
      if (calc(tmp) < calc(v)) tmp = v;
    }
    v = tmp;
  }
  void init2(int n, int m) {
    v.resize(4);
    vector<pair<int, int> > tmp;
    tmp.resize(4);
    tmp[0] = make_pair(0, 0);
    tmp[1] = make_pair(n, m);
    tmp[2] = make_pair(n, 0);
    tmp[3] = make_pair(0, m);
    if (n != 1) {
      v[0] = make_pair(n - 1, m);
      v[1] = make_pair(0, 0);
      v[2] = make_pair(n, m);
      v[3] = make_pair(1, 0);
      if (calc(tmp) < calc(v)) tmp = v;
    }
    v = tmp;
  }
};
nod gao(int n, int m) {
  nod ret, tmp;
  ret.init(n, m);
  tmp.v.resize(4);
  if (n > 1) {
    tmp.v[0] = make_pair(1, 0);
    tmp.v[1] = make_pair(n, 0);
    tmp.v[2] = make_pair(0, 0);
    tmp.v[3] = make_pair(n - 1, 0);
    if (!m)
      ret = tmp;
    else if (ret < tmp)
      ret = tmp;
  }
  if (m > 1) {
    tmp.v[0] = make_pair(0, 1);
    tmp.v[1] = make_pair(0, m);
    tmp.v[2] = make_pair(0, 0);
    tmp.v[3] = make_pair(0, m - 1);
    if (!n)
      ret = tmp;
    else if (ret < tmp)
      ret = tmp;
  }
  if (!m || !n) return ret;
  tmp.init(n, m);
  if (ret < tmp) ret = tmp;
  tmp.init2(n, m);
  if (ret < tmp) ret = tmp;
  return ret;
}
int main() {
  int n, m;
  while (cin >> n >> m) {
    nod ans = gao(n, m);
    for (auto i : ans.v) printf("%d %d\n", i.first, i.second);
  }
  return 0;
}