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;
char _;
inline long long powmod(long long x, long long n, long long _mod) {
  long long res = 1;
  while (n) {
    if (n & 1) res = (res * x) % _mod;
    x = (x * x) % _mod;
    n >>= 1;
  }
  return res;
}
int n, m;
long double dis(pair<int, int> p, pair<int, int> q) {
  return sqrt((long double)(p.first - q.first) * (p.first - q.first) +
              (long double)(p.second - q.second) * (p.second - q.second));
}
bool inside(int x, int y) {
  if (x < 0 or x > n or y < 0 or y > m) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  set<pair<int, int> > s;
  s.insert(make_pair(0, 0));
  if (inside(1, 0)) s.insert(make_pair(1, 0));
  if (inside(0, 1)) s.insert(make_pair(0, 1));
  s.insert(make_pair(n, m));
  if (inside(n - 1, m)) s.insert(make_pair(n - 1, m));
  if (inside(n, m - 1)) s.insert(make_pair(n, m - 1));
  vector<pair<int, int> > v;
  for (__typeof((s).begin()) itr = (s).begin(); itr != (s).end(); itr++)
    v.push_back(*itr);
  long double ans = 0;
  pair<int, int> a, b, c, d;
  do {
    pair<int, int> p1 = v[0];
    pair<int, int> p2 = v[1];
    pair<int, int> p3 = v[2];
    pair<int, int> p4 = v[3];
    long double D = dis(p1, p2) + dis(p2, p3) + dis(p3, p4);
    if ((D + 1e-9) > ans) {
      ans = D;
      a = p1;
      b = p2;
      c = p3;
      d = p4;
    }
  } while (next_permutation((v).begin(), (v).end()));
  if (n > 0 and m > 0) {
    pair<int, int> p1 = make_pair(0, 0);
    pair<int, int> p2 = make_pair(n, m);
    pair<int, int> p3 = make_pair(n, 0);
    pair<int, int> p4 = make_pair(0, m);
    long double D = dis(p1, p2) + dis(p2, p3) + dis(p3, p4);
    if ((D + 1e-9) > ans) {
      ans = D;
      a = p1;
      b = p2;
      c = p3;
      d = p4;
    }
    swap(p3, p4);
    D = dis(p1, p2) + dis(p2, p3) + dis(p3, p4);
    if ((D + 1e-9) > ans) {
      ans = D;
      a = p1;
      b = p2;
      c = p3;
      d = p4;
    }
  }
  cout << a.first << ' ' << a.second << '\n';
  cout << b.first << ' ' << b.second << '\n';
  cout << c.first << ' ' << c.second << '\n';
  cout << d.first << ' ' << d.second << '\n';
  return 0;
}