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>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const int N = 101000;
const int INF = 1 << 30;
const int MOD = (1 << 20) - 1;
const int HMOD = int(1e9) + 7;
int x[10];
int y[10];
int resx[10];
int resy[10];
bool Eq(int x1, int y1, int x2, int y2) {
  return x[x1] == x[x2] && y[y1] == y[y2];
}
double GetLen(int x1, int y1, int x2, int y2) {
  return sqrt((double)(x[x2] - x[x1]) * (x[x2] - x[x1]) +
              (y[y2] - y[y1]) * (y[y2] - y[y1]));
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (n == 0) {
    printf("%d %d\n%d %d\n%d %d\n%d %d\n", 0, 1, 0, m, 0, 0, 0, m - 1);
    return 0;
  }
  if (m == 0) {
    printf("%d %d\n%d %d\n%d %d\n%d %d\n", 1, 0, n, 0, 0, 0, n - 1, 0);
    return 0;
  }
  double maxRes = 0;
  x[0] = 0;
  x[1] = 1;
  x[2] = n;
  x[3] = n - 1;
  y[0] = 0;
  y[1] = 1;
  y[2] = m;
  y[3] = m - 1;
  for (int x1 = 0; x1 < 4; x1++)
    for (int y1 = 0; y1 < 4; y1++)
      for (int x2 = 0; x2 < 4; x2++)
        for (int y2 = 0; y2 < 4; y2++)
          for (int x3 = 0; x3 < 4; x3++)
            for (int y3 = 0; y3 < 4; y3++)
              for (int x4 = 0; x4 < 4; x4++)
                for (int y4 = 0; y4 < 4; y4++) {
                  if (Eq(x1, y1, x2, y2) || Eq(x1, y1, x3, y3) ||
                      Eq(x1, y1, x4, y4) || Eq(x2, y2, x3, y3) ||
                      Eq(x2, y2, x4, y4) || Eq(x3, y3, x4, y4))
                    continue;
                  double len = GetLen(x1, y1, x2, y2) + GetLen(x2, y2, x3, y3) +
                               GetLen(x3, y3, x4, y4);
                  if (len > maxRes) {
                    maxRes = len;
                    resx[0] = x1;
                    resx[1] = x2;
                    resx[2] = x3;
                    resx[3] = x4;
                    resy[0] = y1;
                    resy[1] = y2;
                    resy[2] = y3;
                    resy[3] = y4;
                  }
                }
  for (int i = 0; i < 4; i++) {
    printf("%d %d\n", x[resx[i]], y[resy[i]]);
  }
  return 0;
}