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 GCC optimize("O3")
#pragma G++ optimize("O3")
using namespace std;
const double PI = acos(-1.0);
const int MAXN = 2e5 + 55;
const int INF = 0x3f3f3f3f;
const int NINF = 0x80808080;
const long long NLINF = 0x8080808080808080;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const long long mo = 1e9 + 7;
inline long long fpow(long long a, long long b) {
  long long s = 1;
  a %= mo;
  while (b) {
    if (b & 1) s = s * a % mo;
    a = a * a % mo;
    b >>= 1;
  }
  return s;
}
namespace Fast_IO {
const int MAXL((1 << 18) + 1);
int iof, iotp;
char ioif[MAXL], *ioiS, *ioiT, ioof[MAXL],
    *iooS = ioof, *iooT = ioof + MAXL - 1, ioc, iost[55];
inline char Getchar() {
  if (ioiS == ioiT) {
    ioiS = ioif;
    ioiT = ioiS + fread(ioif, 1, MAXL, stdin);
    return (ioiS == ioiT ? EOF : *ioiS++);
  } else
    return (*ioiS++);
}
inline int read() {
  int x = 0;
  for (iof = 1, ioc = Getchar(); (ioc < '0' || ioc > '9') && ioc != EOF;)
    iof = ioc == '-' ? -1 : 1, ioc = Getchar();
  if (ioc == EOF) exit(0);
  for (x = 0; ioc <= '9' && ioc >= '0'; ioc = Getchar())
    x = (x << 3) + (x << 1) + (ioc ^ 48);
  return x * iof;
}
inline long long read_ll() {
  long long x = 0;
  for (iof = 1, ioc = Getchar(); (ioc < '0' || ioc > '9') && ioc != EOF;)
    iof = ioc == '-' ? -1 : 1, ioc = Getchar();
  if (ioc == EOF) exit(0);
  for (x = 0; ioc <= '9' && ioc >= '0'; ioc = Getchar())
    x = (x << 3) + (x << 1) + (ioc ^ 48);
  return x * iof;
}
}  // namespace Fast_IO
using namespace Fast_IO;
struct node {
  int x1, y1;
  int x2, y2;
  int x3, y3;
  int x4, y4;
  double sum;
} p[10];
int cmp(node a, node b) { return a.sum > b.sum; }
double get_sum(node a) {
  double f1 =
      1.0 * (a.x1 - a.x2) * (a.x1 - a.x2) + 1.0 * (a.y1 - a.y2) * (a.y1 - a.y2);
  double f2 =
      1.0 * (a.x2 - a.x3) * (a.x2 - a.x3) + 1.0 * (a.y2 - a.y3) * (a.y2 - a.y3);
  double f3 =
      1.0 * (a.x3 - a.x4) * (a.x3 - a.x4) + 1.0 * (a.y3 - a.y4) * (a.y3 - a.y4);
  return sqrt(f1) + sqrt(f2) + sqrt(f3);
}
int main() {
  int n = read(), m = read();
  if (n == 0) {
    printf("%d %d\n", 0, 1);
    printf("%d %d\n", 0, m);
    printf("%d %d\n", 0, 0);
    printf("%d %d\n", 0, m - 1);
  } else if (m == 0) {
    printf("%d %d\n", 1, 0);
    printf("%d %d\n", n, 0);
    printf("%d %d\n", 0, 0);
    printf("%d %d\n", n - 1, 0);
  } else {
    p[1].x1 = 0, p[1].y1 = 1;
    p[1].x2 = n, p[1].y2 = m;
    p[1].x3 = 0, p[1].y3 = 0;
    p[1].x4 = n, p[1].y4 = m - 1;
    p[6].x1 = 1, p[6].y1 = 0;
    p[6].x2 = n, p[6].y2 = m;
    p[6].x3 = 0, p[6].y3 = 0;
    p[6].x4 = n - 1, p[6].y4 = m;
    p[2].x1 = n, p[2].y1 = m;
    p[2].x2 = 0, p[2].y2 = 0;
    p[2].x3 = n, p[2].y3 = 0;
    p[2].x4 = 0, p[2].y4 = m;
    p[3].x1 = n, p[3].y1 = m;
    p[3].x2 = 0, p[3].y2 = 0;
    p[3].x3 = 0, p[3].y3 = m;
    p[3].x4 = n, p[3].y4 = 0;
    p[4].x1 = n, p[4].y1 = m;
    p[4].x2 = 0, p[4].y2 = m;
    p[4].x3 = n, p[4].y3 = 0;
    p[4].x4 = 0, p[4].y4 = 0;
    p[5].x1 = n, p[5].y1 = m;
    p[5].x2 = n, p[5].y2 = 0;
    p[5].x3 = 0, p[5].y3 = m;
    p[5].x4 = 0, p[5].y4 = 0;
    for (int i = 1; i <= 6; i++) p[i].sum = get_sum(p[i]);
    sort(p + 1, p + 1 + 6, cmp);
    printf("%d %d\n", p[1].x1, p[1].y1);
    printf("%d %d\n", p[1].x2, p[1].y2);
    printf("%d %d\n", p[1].x3, p[1].y3);
    printf("%d %d\n", p[1].x4, p[1].y4);
  }
}