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;
double distance(pair<int, int> p1, pair<int, int> p2) {
  return sqrt((p2.first - p1.first) * (p2.first - p1.first) +
              (p2.second - p1.second) * (p2.second - p1.second));
}
void solve() {
  int a, b;
  cin >> a >> b;
  if (a == 0) {
    cout << 0 << ' ' << 1 << endl;
    cout << 0 << ' ' << b << endl;
    cout << 0 << ' ' << 0 << endl;
    cout << 0 << ' ' << (b - 1) << endl;
    return;
  }
  if (b == 0) {
    cout << 1 << ' ' << 0 << endl;
    cout << a << ' ' << 0 << endl;
    cout << 0 << ' ' << 0 << endl;
    cout << (a - 1) << ' ' << 0 << endl;
    return;
  }
  set<pair<int, int> > s;
  s.insert({0, 0});
  s.insert({0, 1});
  s.insert({1, 0});
  s.insert({0, b});
  s.insert({1, b});
  s.insert({0, b - 1});
  s.insert({a, b});
  s.insert({a, b - 1});
  s.insert({a - 1, b});
  s.insert({a, 0});
  s.insert({a - 1, 0});
  s.insert({a, 1});
  vector<pair<int, int> > v;
  while (!s.empty()) {
    v.push_back(*s.begin());
    s.erase(*s.begin());
  }
  double dist = 0;
  pair<int, int> p1, p2, p3, p4;
  set<pair<int, int> > st;
  for (int i = 0; i < v.size(); i++) {
    st.insert(v[i]);
    for (int j = 0; j < v.size(); j++) {
      if (st.find(v[j]) != st.end()) continue;
      st.insert(v[j]);
      for (int k = 0; k < v.size(); k++) {
        if (st.find(v[k]) != st.end()) continue;
        st.insert(v[k]);
        for (int l = 0; l < v.size(); l++) {
          if (st.find(v[l]) != st.end()) continue;
          st.insert(v[l]);
          if (dist < distance(v[i], v[j]) + distance(v[j], v[k]) +
                         distance(v[k], v[l])) {
            dist = distance(v[i], v[j]) + distance(v[j], v[k]) +
                   distance(v[k], v[l]);
            p1 = v[i];
            p2 = v[j];
            p3 = v[k];
            p4 = v[l];
          }
          st.erase(v[l]);
        }
        st.erase(v[k]);
      }
      st.erase(v[j]);
    }
    st.erase(v[i]);
  }
  cout << p1.first << ' ' << p1.second << endl;
  cout << p2.first << ' ' << p2.second << endl;
  cout << p3.first << ' ' << p3.second << endl;
  cout << p4.first << ' ' << p4.second << endl;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(10);
  cout << fixed;
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}