Problem:
Score : 400 points

Problem Statement

Given is an integer S.
Find a combination of six integers X_1,Y_1,X_2,Y_2,X_3, and Y_3 that satisfies all of the following conditions:

0 \leq X_1,Y_1,X_2,Y_2,X_3,Y_3 \leq 10^9

The area of the triangle in a two-dimensional plane whose vertices are (X_1,Y_1),(X_2,Y_2), and (X_3,Y_3) is S/2.

We can prove that there always exist six integers that satisfy the conditions under the constraints of this problem.

Constraints

1 \leq S \leq 10^{18}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

S

Output

Print six integers X_1,Y_1,X_2,Y_2,X_3, and Y_3 that satisfy the conditions, in this order, with spaces in between.
If multiple solutions exist, any of them will be accepted.

Sample Input 1

3

Sample Output 1

1 0 2 2 0 1

The area of the triangle in a two-dimensional plane whose vertices are (1,0),(2,2), and (0,1) is 3/2.
Printing 3 0 3 1 0 1 or 1 0 0 1 2 2 will also be accepted.

Sample Input 2

100

Sample Output 2

0 0 10 0 0 10

Sample Input 3

311114770564041497

Sample Output 3

314159265 358979323 846264338 327950288 419716939 937510582

Solution in C# (Mono 4.6.2.0) (judge verdict: Wrong Answer)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;

namespace AtcoderC
{
    class Program
    {
        /*static void Main(string[] args)
        {
        }*/
        //ABC132C
        //全探索法
        /*static void Main()
        {
            BigInteger N = int.Parse(Console.ReadLine());
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int min = input.Min();
            int max = input.Max();
            int countARC = 0;
            int countABC = 0;
            int Answer = 0;
            for (int i = min; i <= max; i++)
            {
                countABC = 0;
                countARC = 0;
                foreach (int n in input)
                {
                    if (n > i)
                    {
                        countARC++;
                    }
                    else
                    {
                        countABC++;
                    }
                }
                if (countABC == countARC)
                {
                    Answer++;
                }
            }
            Console.WriteLine(Answer);
        }*/
        //2回目
        /*static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            Array.Sort(input);
            int min = input[(N / 2) - 1];
            int max = input[N / 2];
            Console.WriteLine(max - min);
        }*/

        //ABC131C
        //ユーグリッドの互除法の応用
        /*static void Main()
        {
            BigInteger[] input = Console.ReadLine().Split().Select(BigInteger.Parse).ToArray();
            BigInteger A = input[0];
            BigInteger B = input[1];
            BigInteger C = input[2];
            BigInteger D = input[3];
            BigInteger ans = (B / C) + (B / D);           
            //最小公倍数
            var ans2 = C * D / lcm(C, D);
            BigInteger ans3 = B / ans2;
            var BB = B - ans + ans3;
            ans = (A - 1) / C + (A - 1) / D;
            ans3 = (A - 1) / ans2;
            var AA = (A - 1) - ans + ans3;
            Console.WriteLine(BB - AA);
            
        }
        static public BigInteger lcm(BigInteger a, BigInteger b)
        {
            var r = a % b;
            while (r != 0)
            {
                a = b;
                b = r;
                r = a % b;
            }
            return b;
        }*/

        //129C
        //動的計画法
        //TLEになる時間がかかり過ぎる
        /*static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int N = input[0];
            int M = input[1];
            List<int> ttt = new List<int>();
            for (int i = 0;i < M;i++)
            {
                var temp = int.Parse(Console.ReadLine());
                ttt.Add(temp);
            }
            int[] dparray = new int[N+2];
            dparray[N] = 1;
            dparray[N - 1] = 1;
            for (int i = N-1; i >= 0; i--)
            {
                if (ttt.Contains(i))
                {
                    dparray[i] = 0;
                }
                dparray[i] = (dparray[i + 1] + dparray[i + 2]) % 1000000007;
            }
            Console.WriteLine(dparray[0]);
        }*/
        //ABC128
        /*static void Main()
        {

        }*/
        //ABC134A
        /*static void Main()
        {
            int r = int.Parse(Console.ReadLine());
            var ans = 3 * r * r;
            Console.WriteLine(ans);
        }*/
        //ABC134B
        /*static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int N = input[0];
            int D = input[1];
            int count = 0;
            int ans = N;
            while (true)
            {
                ans = ans - (D * 2 + 1);
                count++;
                if (ans <= 0)
                {
                    break;
                }
            }
            Console.WriteLine(count);
        }*/
        //ABC134C
        /*static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            List<int> array = new List<int>();
            for (int i =0;i<N; i++)
            {
                array.Add(int.Parse(Console.ReadLine()));
            }
            List<int> ans = new List<int>();
            int max = array.Max();
            var temp  = new List<int>();
            foreach (int n in array)
            {
                 temp.Add(n);
            }
            temp.Sort();
            temp.Reverse();
            int second = temp[1];

            foreach (int nn in array)
            {
                if (nn == max)
                {
                    Console.WriteLine(second);
                }
                else
                {
                    Console.WriteLine(max);
                }
            }
        }*/
        //134ABCD
        /*static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            int count = 0;
            int ans = 0;
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            for (int i = 0;i<N;i++)
            {
                for (int j =0;j<N; j++)
                {
                    if ((j+1)%(i+1)==0)
                    {
                        count += input[j];
                    }
                }
                if (count % 2 == input[i])
                {
                    ans++;
                }
                count = 0;
            }
            if (ans != 0)
            {

            }
        }*/
        //AGC036
        static void Main()
        {
            long S = long.Parse(Console.ReadLine());
            long X1 = 0;
            long Y1 = 0;
            while (true)
            {
                Y1++;
                X1 = S / Y1;
                if (X1 <= 1000000000 && Y1 <= 1000000000)
                {
                    break;
                }
            }
            Console.WriteLine("0 0 "+X1+" 0 0 "+Y1);
        }
    }
}