#include <bits/stdc++.h>
using namespace std;
template <class T1>
void debug(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void debug(T1 e1, T2 e2) {
  cout << e1 << "\t" << e2 << endl;
}
template <class T1, class T2, class T3>
void debug(T1 e1, T2 e2, T3 e3) {
  cout << e1 << "\t" << e2 << "\t" << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void debug(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << "\t" << e2 << "\t" << e3 << "\t" << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void debug(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << "\t" << e2 << "\t" << e3 << "\t" << e4 << "\t" << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void debug(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << "\t" << e2 << "\t" << e3 << "\t" << e4 << "\t" << e5 << "\t"
       << e6 << endl;
}
template <class T>
void debug(vector<vector<T> > e, int row, int col) {
  int i, j;
  for (i = 0; i < row; i++) {
    for (j = 0; j < col; j++) cout << e[i][j] << " ";
    cout << endl;
  }
  cout << endl;
}
template <class T>
void debug(vector<basic_string<T> > e, int row, int col) {
  int i, j;
  for (i = 0; i < row; i++) {
    for (j = 0; j < col; j++) cout << e[i][j];
    cout << endl;
  }
  cout << endl;
}
template <class T>
void debug(T e[110][110], int row, int col) {
  int i, j;
  for (i = 0; i < row; i++) {
    for (j = 0; j < col; j++) cout << e[i][j] << " ";
    cout << endl;
  }
}
template <class T>
string toString(T n) {
  ostringstream oss;
  oss << n;
  oss.flush();
  return oss.str();
}
int toInt(string s) {
  int r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
bool isVowel(char ch) {
  ch = tolower(ch);
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    return true;
  return false;
}
bool isUpper(char c) { return c >= 'A' && c <= 'Z'; }
bool isLower(char c) { return c >= 'a' && c <= 'z'; }
int n, m;
double dist(int x1, int y1, int x2, int y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main() {
  while (cin >> n >> m) {
    int i, j;
    if (n == 0) {
      cout << 0 << " " << 1 << endl;
      cout << 0 << " " << m << endl;
      cout << 0 << " " << 0 << endl;
      cout << 0 << " " << m - 1 << endl;
      continue;
    }
    if (m == 0) {
      cout << 1 << " " << 0 << endl;
      cout << n << " " << 0 << endl;
      cout << 0 << " " << 0 << endl;
      cout << n - 1 << " " << 0 << endl;
      continue;
    }
    double d1, d2;
    if (n > m)
      d1 = 2.0 * dist(0, 0, n, m) + dist(n, m, 0, m);
    else
      d1 = 2.0 * dist(0, 0, n, m) + dist(n, m, n, 0);
    d2 = dist(0, 0, n, m) + max(dist(0, 1, n, m), dist(1, 0, n, m)) +
         max(dist(0, 0, n - 1, m), dist(0, 0, n, m - 1));
    if (d1 > d2) {
      cout << 0 << " " << 0 << endl;
      cout << n << " " << m << endl;
      if (n > m) {
        cout << 0 << " " << m << endl;
        cout << n << " " << 0 << endl;
        continue;
      }
      cout << n << " " << 0 << endl;
      cout << 0 << " " << m << endl;
      continue;
    }
    if (dist(0, 1, n, m) > dist(1, 0, n, m))
      cout << 0 << " " << 1 << endl;
    else
      cout << 1 << " " << 0 << endl;
    cout << n << " " << m << endl;
    cout << 0 << " " << 0 << endl;
    if (dist(0, 0, n - 1, m) > dist(0, 0, n, m - 1))
      cout << n - 1 << " " << m << endl;
    else
      cout << n << " " << m - 1 << endl;
  }
  return 0;
}

### Prompt

Please formulate a Cpp solution to the following 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

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template <class T1>
void debug(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void debug(T1 e1, T2 e2) {
  cout << e1 << "\t" << e2 << endl;
}
template <class T1, class T2, class T3>
void debug(T1 e1, T2 e2, T3 e3) {
  cout << e1 << "\t" << e2 << "\t" << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void debug(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << "\t" << e2 << "\t" << e3 << "\t" << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void debug(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << "\t" << e2 << "\t" << e3 << "\t" << e4 << "\t" << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void debug(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << "\t" << e2 << "\t" << e3 << "\t" << e4 << "\t" << e5 << "\t"
       << e6 << endl;
}
template <class T>
void debug(vector<vector<T> > e, int row, int col) {
  int i, j;
  for (i = 0; i < row; i++) {
    for (j = 0; j < col; j++) cout << e[i][j] << " ";
    cout << endl;
  }
  cout << endl;
}
template <class T>
void debug(vector<basic_string<T> > e, int row, int col) {
  int i, j;
  for (i = 0; i < row; i++) {
    for (j = 0; j < col; j++) cout << e[i][j];
    cout << endl;
  }
  cout << endl;
}
template <class T>
void debug(T e[110][110], int row, int col) {
  int i, j;
  for (i = 0; i < row; i++) {
    for (j = 0; j < col; j++) cout << e[i][j] << " ";
    cout << endl;
  }
}
template <class T>
string toString(T n) {
  ostringstream oss;
  oss << n;
  oss.flush();
  return oss.str();
}
int toInt(string s) {
  int r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
bool isVowel(char ch) {
  ch = tolower(ch);
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    return true;
  return false;
}
bool isUpper(char c) { return c >= 'A' && c <= 'Z'; }
bool isLower(char c) { return c >= 'a' && c <= 'z'; }
int n, m;
double dist(int x1, int y1, int x2, int y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main() {
  while (cin >> n >> m) {
    int i, j;
    if (n == 0) {
      cout << 0 << " " << 1 << endl;
      cout << 0 << " " << m << endl;
      cout << 0 << " " << 0 << endl;
      cout << 0 << " " << m - 1 << endl;
      continue;
    }
    if (m == 0) {
      cout << 1 << " " << 0 << endl;
      cout << n << " " << 0 << endl;
      cout << 0 << " " << 0 << endl;
      cout << n - 1 << " " << 0 << endl;
      continue;
    }
    double d1, d2;
    if (n > m)
      d1 = 2.0 * dist(0, 0, n, m) + dist(n, m, 0, m);
    else
      d1 = 2.0 * dist(0, 0, n, m) + dist(n, m, n, 0);
    d2 = dist(0, 0, n, m) + max(dist(0, 1, n, m), dist(1, 0, n, m)) +
         max(dist(0, 0, n - 1, m), dist(0, 0, n, m - 1));
    if (d1 > d2) {
      cout << 0 << " " << 0 << endl;
      cout << n << " " << m << endl;
      if (n > m) {
        cout << 0 << " " << m << endl;
        cout << n << " " << 0 << endl;
        continue;
      }
      cout << n << " " << 0 << endl;
      cout << 0 << " " << m << endl;
      continue;
    }
    if (dist(0, 1, n, m) > dist(1, 0, n, m))
      cout << 0 << " " << 1 << endl;
    else
      cout << 1 << " " << 0 << endl;
    cout << n << " " << m << endl;
    cout << 0 << " " << 0 << endl;
    if (dist(0, 0, n - 1, m) > dist(0, 0, n, m - 1))
      cout << n - 1 << " " << m << endl;
    else
      cout << n << " " << m - 1 << endl;
  }
  return 0;
}

```