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>
const char en = '\n';
using namespace std;
vector<pair<long long, long long> > vys;
long double naj = 0;
long double dst(pair<long long, long long> a, pair<long long, long long> b) {
  return sqrt((a.first - b.first) * (a.first - b.first) +
              (a.second - b.second) * (a.second - b.second));
}
void test(pair<long long, long long> a, pair<long long, long long> b,
          pair<long long, long long> c, pair<long long, long long> d) {
  vector<pair<long long, long long> > X;
  X.push_back(a);
  X.push_back(b);
  X.push_back(c);
  X.push_back(d);
  set<pair<long long, long long> > S(X.begin(), X.end());
  if (S.size() != 4) return;
  sort(X.begin(), X.end());
  do {
    long double sum = 0;
    for (int i = 0; i < X.size() - 1; i++) {
      sum += dst(X[i], X[(i + 1) % 4]);
    }
    if (sum > naj) {
      naj = sum;
      vys = X;
    }
  } while (next_permutation(X.begin(), X.end()));
}
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  int kons = 3;
  for (int i1 = 0; i1 <= kons; i1++)
    for (int i2 = 0; i2 <= kons; i2++)
      for (int i3 = 0; i3 <= kons; i3++)
        for (int i4 = 0; i4 <= kons; i4++)
          for (int i5 = 0; i5 <= kons; i5++)
            for (int i6 = 0; i6 <= kons; i6++)
              for (int i7 = 0; i7 <= kons; i7++)
                for (int i8 = 0; i8 <= kons; i8++) {
                  if (i1 <= n && i3 <= n && n - i5 >= 0 && n - i7 >= 0)
                    if (i2 <= m && i4 <= m && m - i6 >= 0 && m - i8 >= 0)
                      test(make_pair(i1, i2), make_pair(i3, i4),
                           make_pair(n - i5, m - i6),
                           make_pair(n - i7, m - i8));
                }
  for (int i = 0; i < vys.size(); i++)
    cout << vys[i].first << " " << vys[i].second << en;
}