#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  if (n == 0 && m > 0) {
    cout << 0 << " " << 1 << '\n';
    cout << 0 << " " << m << '\n';
    cout << 0 << " " << 0 << '\n';
    cout << 0 << " " << m - 1 << '\n';
  } else if (n > 0 && m == 0) {
    cout << 1 << " " << 0 << '\n';
    cout << n << " " << 0 << '\n';
    cout << 0 << " " << 0 << '\n';
    cout << n - 1 << " " << 0 << '\n';
  } else if (n == m) {
    if (n > 3) {
      cout << 0 << " " << 1 << '\n';
      cout << n << " " << m << '\n';
      cout << 0 << " " << 0 << '\n';
      cout << n - 1 << " " << m << '\n';
    } else {
      cout << 0 << " " << 0 << '\n';
      cout << n << " " << m << '\n';
      cout << 0 << " " << m << '\n';
      cout << n << " " << 0 << '\n';
    }
  } else if (n > m) {
    if (n > 3 && m > 3) {
      cout << 0 << " " << 1 << '\n';
      cout << n << " " << m << '\n';
      cout << 0 << " " << 0 << '\n';
      cout << n << " " << m - 1 << '\n';
    } else {
      cout << 0 << " " << 0 << '\n';
      cout << n << " " << m << '\n';
      cout << 0 << " " << m << '\n';
      cout << n << " " << 0 << '\n';
    }
  } else if (n < m) {
    if (n > 3 && m > 3) {
      cout << 1 << " " << 0 << '\n';
      cout << n << " " << m << '\n';
      cout << 0 << " " << 0 << '\n';
      cout << n - 1 << " " << m << '\n';
    } else {
      cout << 0 << " " << 0 << '\n';
      cout << n << " " << m << '\n';
      cout << n << " " << 0 << '\n';
      cout << 0 << " " << m << '\n';
    }
  }
  return 0;
}
