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 = 1e9 + 10;
const int MOD = 1e9 + 7;
const int MAXN = 1e6 + 10;
const int LOG = 20;
const long long BINF = 1e18 + 10;
const long long LINF = 1e18 + 10;
const long double EPS = 1e-10;
const long double PI = acos(-1);
inline void error() {
  cout << -1;
  exit(0);
}
long double dist(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));
}
int n, m;
set<pair<int, int> > st;
long double ans = -INF;
pair<int, int> arr[4];
vector<pair<int, int> > arr2;
vector<int> res;
inline void source() {
  cin >> n >> m;
  arr[0] = make_pair(0, 0);
  arr[1] = make_pair(n, 0);
  arr[2] = make_pair(0, m);
  arr[3] = make_pair(n, m);
  for (register int i(0); i < 4; i++) {
    pair<int, int> p = arr[i];
    for (int j = -1; j <= 1; j++) {
      for (int j2 = -1; j2 <= 1; j2++) {
        if (p.first + j >= 0 && p.first + j <= n && p.second + j2 >= 0 &&
            p.second + j2 <= m) {
          arr2.push_back(make_pair(p.first + j, p.second + j2));
        }
      }
    }
  }
  for (register int i(0); i < arr2.size(); i++) {
    for (register int i2(0); i2 < arr2.size(); i2++) {
      for (register int i3(0); i3 < arr2.size(); i3++) {
        for (register int i4(0); i4 < arr2.size(); i4++) {
          st.clear();
          st.insert(arr2[i]);
          st.insert(arr2[i2]);
          st.insert(arr2[i3]);
          st.insert(arr2[i4]);
          if (st.size() < 4) {
            continue;
          }
          if (ans < dist(arr2[i], arr2[i2]) + dist(arr2[i2], arr2[i3]) +
                        dist(arr2[i3], arr2[i4])) {
            ans = dist(arr2[i], arr2[i2]) + dist(arr2[i2], arr2[i3]) +
                  dist(arr2[i3], arr2[i4]);
            res.clear();
            res.push_back(i);
            res.push_back(i2);
            res.push_back(i3);
            res.push_back(i4);
          }
        }
      }
    }
  }
  for (register int i(0); i < res.size(); i++) {
    cout << arr2[res[i]].first << " " << arr2[res[i]].second << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(0));
  source();
  return 0;
}