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;
struct _ {
  _() { ios_base::sync_with_stdio(0); }
} _;
template <class A, class B>
ostream &operator<<(ostream &o, pair<A, B> t) {
  o << "(" << t.first << ", " << t.second << ")";
  return o;
}
template <class T>
string tostring(T first, int len = 0, char c = '0') {
  stringstream ss;
  ss << first;
  string r = ss.str();
  if (r.length() < len) r = string(len - r.length(), c) + r;
  return r;
}
template <class T>
void PV(T a, T b, int n = 0, int w = 0, string s = " ") {
  int c = 0;
  while (a != b) {
    cout << tostring(*a++, w, ' ');
    if (a != b && (n == 0 || ++c % n))
      cout << s;
    else
      cout << endl;
  }
}
template <class T>
inline bool chmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
inline bool chmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
const long long linf = 0x3f3f3f3f3f3f3f3fLL;
const int inf = 0x3f3f3f3f;
const int mod = int(1e9) + 7;
const int N = 111111;
double dist2(pair<int, int> a, pair<int, int> b) {
  double x0 = a.first, y0 = a.second;
  double x1 = b.first, y1 = b.second;
  return sqrt((x0 - x1) * (x0 - x1) + (y0 - y1) * (y0 - y1));
}
int n, m;
int main() {
  cin >> n >> m;
  int s = 0;
  if (n > m) {
    s = 1;
    swap(n, m);
  }
  vector<pair<int, int> > v;
  if (n == 0) {
    v.push_back(make_pair(0, 1));
    v.push_back(make_pair(0, m));
    v.push_back(make_pair(0, 0));
    v.push_back(make_pair(0, m - 1));
  } else {
    vector<pair<int, int> > can;
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++) {
        if (i + j < 5 || (n - i + m - j) < 5 || i + (m - j) < 5 ||
            (n - i) + j < 5)
          can.push_back(make_pair(i, j));
      }
    sort((can).begin(), (can).end()),
        can.resize(unique((can).begin(), (can).end()) - can.begin());
    double maxDist = 0;
    int t1, t2, t3, t4;
    for (int p1 = 0; p1 < can.size(); p1++)
      for (int p2 = 0; p2 < can.size(); p2++)
        for (int p3 = 0; p3 < can.size(); p3++)
          for (int p4 = 0; p4 < can.size(); p4++) {
            if (p1 == p2 || p1 == p3 || p1 == p4 || p2 == p3 || p2 == p4 ||
                p3 == p4)
              continue;
            double dist = 0;
            dist += dist2(can[p1], can[p2]);
            dist += dist2(can[p2], can[p3]);
            dist += dist2(can[p3], can[p4]);
            if (chmax(maxDist, dist)) {
              t1 = p1;
              t2 = p2;
              t3 = p3;
              t4 = p4;
            }
          }
    v.push_back(can[t1]);
    v.push_back(can[t2]);
    v.push_back(can[t3]);
    v.push_back(can[t4]);
  }
  for (auto i : v) {
    if (s)
      cout << i.second << " " << i.first << endl;
    else
      cout << i.first << " " << i.second << endl;
  }
  return 0;
}