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 INF = INT_MAX;
const long long INFL = LLONG_MAX;
long double dist(vector<pair<int, int> > v1) {
  long double ans = 0;
  for (int(i) = 0; (i) < (3); (i)++) {
    long double x = v1[i].first - v1[i + 1].first;
    long double y = v1[i].second - v1[i + 1].second;
    x *= x;
    y *= y;
    ans += sqrt(x + y);
  }
  return ans;
}
int comp(vector<pair<int, int> > v1, vector<pair<int, int> > v2) {
  return dist(v1) > dist(v2);
}
vector<vector<pair<int, int> > > v;
int N, M;
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(15);
  cin >> N >> M;
  int k = 1;
  vector<int> ns;
  for (int(i) = 0; (i) < (min(k, N) + 1); (i)++) ns.push_back(i);
  for (int(i) = 0; (i) < (min(k, N) + 1); (i)++) ns.push_back(max(0, N - i));
  vector<int> ms;
  for (int(i) = 0; (i) < (min(k, M) + 1); (i)++) ms.push_back(i);
  for (int(i) = 0; (i) < (min(k, M) + 1); (i)++) ms.push_back(max(0, M - i));
  for (int(i1) = 0; (i1) < (ns.size()); (i1)++)
    for (int(j1) = 0; (j1) < (ms.size()); (j1)++)
      for (int(i2) = 0; (i2) < (ns.size()); (i2)++)
        for (int(j2) = 0; (j2) < (ms.size()); (j2)++)
          for (int(i3) = 0; (i3) < (ns.size()); (i3)++)
            for (int(j3) = 0; (j3) < (ms.size()); (j3)++)
              for (int(i4) = 0; (i4) < (ns.size()); (i4)++)
                for (int(j4) = 0; (j4) < (ms.size()); (j4)++) {
                  vector<pair<int, int> > v1;
                  v1.push_back(make_pair(ns[i1], ms[j1]));
                  v1.push_back(make_pair(ns[i2], ms[j2]));
                  v1.push_back(make_pair(ns[i3], ms[j3]));
                  v1.push_back(make_pair(ns[i4], ms[j4]));
                  int flag = 1;
                  for (int(i) = 0; (i) < (4); (i)++)
                    for (int(j) = 0; (j) < (4); (j)++)
                      flag &= i == j || v1[i] != v1[j];
                  if (flag) v.push_back(v1);
                }
  sort(v.begin(), v.end(), comp);
  for (int(i) = 0; (i) < (4); (i)++)
    cout << v[0][i].first << ' ' << v[0][i].second << '\n';
}