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 (Python):
if __name__ == '__main__':
    s = int(input())
    m = 10 ** 9
    x = (m - s % m) % m
    y = (s + x) // m
    print("0 0 1000000000 1 {} {}".format(x, y))

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
  return list(map(int,input().split()))
def m(): 
  return map(int,input().split())
def onem(): 
  return int(input())
def s(x): 
  a = []
  if len(x) == 0:
    return []
  aa = x[0]
  su = 1
  for i in range(len(x)-1):
    if aa != x[i+1]:
      a.append([aa,su])
      aa = x[i+1]
      su = 1
    else:
      su += 1
  a.append([aa,su])
  return a
def jo(x): 
  return " ".join(map(str,x))
def max2(x): 
  return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
  ll = 0
  rr = r
  while True:
    mid = (ll+rr)//2

  if rr == mid:
    return ll
  if (ここに評価入れる):
    rr = mid
  else:
    ll = mid+1
"""

s = onem()

x = [0,10**9,0]
y = [0,1,0]

x[-1] = -s % 10**9
y[-1] = -(-s // 10**9)

print(x[0],y[0],x[1],y[1],x[2],y[2])

Solution (Python):
s = int(input())
v = 10**9
x = (v-s%v)%v
y = (s+x)//v
print(0,0,10**9,1,x, y)

Solution (Python):
from math import ceil

S = int(input())
ax, ay = 10 ** 9 , 1
by = ceil(S / 10 ** 9)
bx = 10 ** 9 * by - S
print(0, 0, ax, ay, bx, by)

Solution (Python):
S = int(input())
v = 10**9
b2 = (S+v-1)//v
b1 = v*b2-S
print(v, 1, 0, 0, b1, b2)

Solution (Python):
S=int(input())
X1=0
Y1=0
X2=10**9
Y2=1
X3=-S%X2
Y3=(X3+S)//X2
ans=[X1,Y1,X2,Y2,X3,Y3]
print(*ans)

Solution (Python):
s = int(input())
MOD = 10**9
x = (-s) % MOD
y = (s+x)//MOD
print(0, 0, 10**9, 1, x, y)

Solution (Python):
s = int(input())
MOD = 10**9
y2, x2 = divmod(s, MOD)
if y2+1 <= MOD:
    x2 = abs(x2-MOD)
    y2 += 1
print(0, 0, 10**9, 1, x2, y2)

Solution (Python):












ra = range
enu = enumerate
S = int(input())
a, b = divmod(S, 10 ** 9)
if b == 0:
    y2 = a
    x2 = 0
else:
    y2 = a + 1
    x2 = 10 ** 9 - b

print(0, 0, 10 ** 9, 1, x2, y2)

Solution (Python):
S = int(input())
ans = [0, 0, 1, 10 ** 9]
if S % (10 ** 9) == 0:
    ans.extend([S // (10 ** 9), 0])
else:
    ans.extend([S // (10 ** 9) + 1, 10 ** 9 - S % (10 ** 9)])
print(' '.join([str(a) for a in ans]))

Solution (Python):
import math
 
S = int(input())
 
 
X1 = 0
Y1 = 0
X2 = 10 ** 9
X3 = 1
 
Y3 = math.ceil(S / (10 ** 9))
Y2 = X2 * Y3 - S
 
print(X1, Y1, X2, Y2, X3, Y3)

Solution (Python):
s = int(input())
x = [0,10**9]
y = [0,1]
tmp = 10**9
x3 = 0
if s % tmp != 0:
    x3 = tmp - (s % tmp)

y3 = (s + x3) // tmp

print(0,0,10**9,1,x3,y3)

Solution (Python):
from math import sqrt
s = int(input())
a = 10 ** 9
b = s // a
c = s % a
if c != 0:
    b += 1
    c = a - c
print(0, 0, a, 1, c, b)

Solution (Python):
import math

S = int(input())


X1 = 0
Y1 = 0
X2 = 10 ** 9
X3 = 1

Y3 = math.ceil(S / (10 ** 9))
Y2 = X2 * Y3 - S

print(X1, Y1, X2, Y2, X3, Y3)

Solution (Python):
S = int(input())
import math

if S == 10**18:
    print(0,0,10**9,0,0,10**9)
else:
    Y3 = S // 10**9 + 1
    X3 = 10**9 - S % 10**9

    print(0,0,10**9,1,X3,Y3)

Solution (Python):
def resolve():
    S = int(input())
    
    i, mod = divmod(S, 10 ** 9)
    
    
    if mod == 0:
        print(0, 0, 10 ** 9, mod, 1, i)
    
    else:
        print(0, 0, 10 ** 9, 10 ** 9 * (i + 1) - S, 1, i + 1)


resolve()

Solution (Python):
def resolve():
    S=int(input())
    i,mod=divmod(S,10**9)
    if mod==0:
        print(0,0,10**9,mod,1,i)
    else:
        print(0,0,10**9,10**9*(i+1)-S,1,i+1)

resolve()

Solution (Python):
def main():
    s = int(input())
    N = 10**9

    y2 = 1
    y3 = s // N + 1
    x3 = N - s % N
    if y3 == N+1:
        y2 = 0
        y3 = N
        x3 = N
    
    print("0 0 1000000000 {} {} {}".format(str(y2),str(x3),str(y3))) 

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    S = int(input())
    x1, y1 = 10**9, 1
    if S < 10**9:
        x1 = 1
        x2 = 0
        y2 = S
    else:
        y2 = 0--S//10**9
        x2 = x1*y2 - S
    print(0, 0, x1, y1, x2, y2)


if __name__ == '__main__':
    main()

Solution (Python):
s = int(input())
if s == 10**18:
    print(0, 0, 10**9, 0, 1, 10**9)
    exit()
q, r = divmod(s, 10**9)
print(0, 0, 10**9, 10**9-r, 1, q+1)

Solution (Python):
import math
s = int(input())
x1 = y1 = 0
x2 = y3 = math.ceil(s**0.5)
x3 = y2 = 0
diff = x2*y3 - s
for i in range(int(diff**0.5), 0, -1):
    if diff % i == 0:
        x3 = i
        y2 = diff // i
print(x1,y1,x2,y2,x3,y3)

Solution (Python):
import sys
input = sys.stdin.readline

S = int(input())

M = 10 ** 9
t = (-S) % M
x = (S + t) // M

answer = [0,0,1,x,M,t]

print(*answer)

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    S = int(input())
    
    a = 10 ** 9
    c = (S - 1) // a + 1
    bd = a * c - S
    if bd == 0: b, d = 0, 0
    else:
        for i in range(1, bd):
            if i ** 2 > bd: break
            if bd % i == 0:
                b, d = i, bd // i
                break
    print(0, 0, a, b, d, c)

    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
s=int(input())
x1,y1=0,0
x2,y2=10**9,1
x3,y3=0,0

mod=10**9
r=(mod-s%mod)%mod
q=(s+r)/mod
x3=int(r)
y3=int(q)
print(x1,y1,x2,y2,x3,y3)

Solution (Python):
import math
s=int(input())
up=int(math.sqrt(s))+1
if s==1000000000000000000:
    print("0 0 1000000000 0 0 1000000000")
    exit()
print("{} {} {} {} {} {}".format(0,0,1,up,up,up*up-s))

Solution (Python):
S = int(input())





Y3 = (S + 10 ** 9 - 1) // (10 ** 9)
X3 = Y3 * (10 ** 9) - S

print(0, 0, 10 ** 9, 1, X3, Y3)

Solution (Python):
S = int(input())

Y = -(-S // (10**9))
X = -(S - (Y * (10**9)))

print('0 0 {} 1 {} {}'.format(10**9, X, Y))

Solution (Python):
S=int(input())
if S<10**18:
    x1,y1,x2,y2,x3,y3=0,0,(S//10**9+1),10**9-S%10**9,1,10**9
else:
    x1,y1,x2,y2,x3,y3=(0,0,10**9,1,0,10**9)
print(x1,y1,x2,y2,x3,y3)

Solution (Python):
S = int(input())
X1 = (S + 10**9 - 1) // 10**9
X2 = X1 * 10**9 - S
print(X1, 1, X2, 10**9, '0 0')

Solution (Python):
S = int(input())
X1 = (S + 999999999) // 1000000000
X2 = X1 * 1000000000 - S
print(X1, 1, X2, '1000000000 0 0')

Solution (Python):
import math
S = int(input())
a = math.ceil(math.sqrt(S))
b = a ** 2 - S
a2 = str(a)
b2 = str(b)
print("0 0 " + a2 + " 1 " + b2 + " " + a2)

Solution (Python):
S=int(input())
if S==10**18:
    print(0,0,0,10**9,10**9,0)
else:
    print(0,0,(S//10**9)+1,1,10**9-S%10**9,10**9)

Solution (Python):
s = int(input())

x1 = y1 = 0
x2, y2 = 10**9, 1
x3 = (10**9 - s % 10**9) % 10**9
y3 = (s + x3) // 10 ** 9

print(x1, y1, x2, y2, x3, y3)

Solution (Python):
import math
s=int(input())
low=math.floor(s**0.5)
right=math.ceil(s**0.5)
if low==right:
    print(0,0,low,0,0,low)
else:
    print(0,0,right,right**2-s,1,right)

Solution (Python):
import sys
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]

def bunkai(x):
    for i in reversed(range(1, int(x**0.5//1)+1)):
        
        if x%i == 0:
            return list((i, x//i))
    return list((1, S))


S = ii()
lim = 10**9
'''

a, b = bunkai(S)[0], bunkai(S)[1]
if a==b:
    print(0, 0, bunkai(S)[0], 0, 0, bunkai(S)[1])
    exit()
for i in range(1, 10**18-S):
    if bunkai(i)[0]<=lim and bunkai(i)[1]<=lim and bunkai(S+i)[0]<=lim and bunkai(S+i)[1]<=lim:
        print(0, 0, bunkai(i)[0], bunkai(S+1)[1], bunkai(S+1)[0], bunkai(i)[1])
        exit()
'''
s12 = S**0.5
a = int(s12)
keta = len(str(a))
b = 10**keta
if float(a)==s12:
    print(0, 0, a, 0, 0, a)
    exit()

    
    
print(0, 0, a+1, bunkai((a+1)**2-S)[1], bunkai((a+1)**2-S)[0], a+1)
exit()

Solution (Python):
import sys
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]

def bunkai(x):
    for i in reversed(range(1, int(x**0.5//1)+1)):
        
        if x%i == 0:
            return list((i, x//i))
    return list((1, S))


S = ii()
lim = 10**9
'''

a, b = bunkai(S)[0], bunkai(S)[1]
if a==b:
    print(0, 0, bunkai(S)[0], 0, 0, bunkai(S)[1])
    exit()
for i in range(1, 10**18-S):
    if bunkai(i)[0]<=lim and bunkai(i)[1]<=lim and bunkai(S+i)[0]<=lim and bunkai(S+i)[1]<=lim:
        print(0, 0, bunkai(i)[0], bunkai(S+1)[1], bunkai(S+1)[0], bunkai(i)[1])
        exit()
'''
s12 = S**0.5
a = int(s12)
keta = len(str(a))
b = 10**keta
if float(a)==s12:
    print(0, 0, a, 0, 0, a)
    exit()
for i in range(a+1, b+1):
    ii = i**2
    if bunkai(ii)[0]<=lim and bunkai(ii)[1]<=lim and bunkai(ii-S)[0]<=lim and bunkai(ii-S)[1]<=lim:
        print(0, 0, i, bunkai(ii-S)[1], bunkai(ii-S)[0], i)
        exit()

Solution (Python):
import math
s = int(input())

x1 = 10**9
y2 = math.ceil(s/10**9)
x2 = 1
y1 = x1*y2 - s

print(0,0,x1,y1,x2,y2)

Solution (Python):
L = 10 ** 9
N = int(input())
y = (N - 1) // L + 1
x = (-N) % L
print(0, 0, L, 1, x, y)

Solution (Python):
L = 10 ** 9
N = int(input())
y = (N - 1) // L + 1
x = (L - N) % L
print(0, 0, L, 1, x, y)

Solution (Python):
from math import ceil


def main():
    area = int(input())
    upper_limit = 10 ** 9
    answer = [0, 0, upper_limit, 1, 0, ceil(area / upper_limit)]
    answer[4] = upper_limit * answer[5] - area
    print(" ".join(map(str, answer)))


if __name__ == '__main__':
    main()

Solution (Python):
S = int(input())

x1 = 0
y1 = 0
x2 = 10 ** 9
y2 = 1

y3_, x3_  =  divmod(S, x2)
if y3_ == 10 ** 9:
  y3 = y3_
  x3 = x3_
else:
  y3 = y3_ + 1
  x3 = 10 ** 9 - x3_

print(x1, y1, x2, y2, x3, y3)

Solution (Python):
def main():
    S = int(input())
    v = 10**9
    ans = [0,0,10**9,1,(v-S%v)%v,(S+(v-S%v)%v)//v]
    print(*ans)

if __name__ == "__main__":
    main()

Solution (Python):
s = int(input())

v = 10**9
x = (v - s % v) % v
y = (s + x) // (10**9)

print('0 0 1000000000 1', x, y)

Solution (Python):
s = int(input())
v = 1000000000
x=(v-s%v)%v
y=(s+x)//v
print("0 0 1000000000 1",int(x),int(y))

Solution (Python):
S = int(input())
X1 = 0
Y1 = 0
X2 = 10**9
Y2 = 1
X3 = S%(10**9)
Y3 = S//(10**9)
if X3 != 0:
  Y3 += 1
  X3 = X2 - X3
print(X1,Y1,X2,Y2,X3,Y3)

Solution (Python):
from math import sqrt

S=int(input())
if S==10**18:
    print(10**9,0,0,10**9,0,0)
else:
    q=int(sqrt(S))
    test=q*(q+1)-S
    if test>=0:
        print(0,0,q,1,test,q+1)
    else:
        print(0,1,q+1,0,-test,q+1)

Solution (Python):
s = int(input())
v = 1000000000
x = (v - s % v) % v
y = (s + x) // v
print("0 0 1000000000 1 {0} {1}".format(x,y ))

Solution (Python):
import math

S = int(input())
if S <= 10**9:
  print("{} {} {} {} {} {}".format(0,0,10**9,1,10**9-S,1))
else:
  print("{} {} {} {} {} {}".format(0,0,10**9,1,(10**9)*math.ceil(S/(10**9))-S,math.ceil(S/(10**9))))

Solution (Python):
S=int(input())

X_2=pow(10,9)
X_3=(X_2-S)%X_2
Y_3=(S+X_3)//X_2

print(0,0,X_2,1,X_3,Y_3)

Solution (Python):
s=int(input())
x1=0
y1=0
x2=10**9
y2=1
y3=s//(10**9)
x3=s%(10**9)
if x3!=0:
    y3+=1
    x3=x2-x3
print(x1,y1,x2,y2,x3,y3)

Solution (Python):
def main():
    S = int(input())
    y3 = (S+10**9-1)//10**9
    x3 = 10**9 * y3 - S
    print(0, 0, 10**9, 1, x3, y3)


if __name__ == '__main__':
    main()

Solution (Python):

S=int(input())
X1=0
Y1=0

X2=10**9
Y2=1

X3=S%X2
Y3=S//X2


if X3!=0:
    Y3+=1
    X3=X2-X3


print(X1,Y1,X2,Y2,X3,Y3)

Solution (Python):
s=int(input())
x3,y3,x2,y2,y1=0,0,-int(-s**0.5//1),1,-int(-s**0.5//1)
x1=x2*y1-s
if x2*y1-s==0:
    x1,y2=0,0
print(x1,y1,x2,y2,x3,y3)

Solution (Python):
S = int(raw_input())

X1 = 0
Y1 = 0
X2 = 10**9
Y2 = 1

mod = 10**9

if S%mod == 0:
    X3 = 0
    Y3 = S/mod
else:
    Y3 = S/mod + 1
    X3 = mod - S%mod


print X1, Y1, X2, Y2, X3, Y3

Solution (Python):
S = int(raw_input())

X1 = 0
Y1 = 0
X2 = 10**9
Y2 = 1

mod = 10**9

X3 = (mod - S)%mod
Y3 = (S+X3)/mod



print X1, Y1, X2, Y2, X3, Y3

Solution (Python):

import sys,os
from collections import defaultdict, deque
from fractions import gcd
from math import ceil, floor
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    XLMIIS = lambda x: [LMIIS() for _ in range(x)]
    YN = lambda c : print('Yes') if c else print('No')
    MOD = 10**9+7

    S = II()
    if S == 10**18:
        x1,y1,x2,y2,x3,y3 = 0,0,10**9,0,0,10**9
    else:
        x1,y1,x2,y2 = 0,0,10**9,1
        y3 = 0 if S < 10 ** 9 else S // 10**9 + 1
        x3 = S % 10**9 if y3 == 0 else 10**9 - S % 10 ** 9
    print(x1,y1,x2,y2,x3,y3)
    assert(abs(x3*y2-y3*x2)==S)
    assert(x3 <= 10**9)
    assert(y3 <= 10**9)



if __name__ == '__main__':
    main()

Solution (Python):

from collections import Counter, deque





import math

import sys



ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    s = int(input())

    CONST = 10**9

    if s % CONST != 0:
        a = CONST
        d = math.ceil(s/CONST)
        b = CONST - (s % CONST)
        c = 1
    else:
        a = CONST
        b = 0
        c = CONST
        d = s // CONST

    print(0, 0, a, b, c, d)

if __name__ == '__main__':
    main()

Solution (Python):
s = int(input())
l = [0,0,10**9,1,10**9-(s%(10**9)),s//(10**9)+1]
if s == 10**18:
  l = [0,0,10**9,0,0,10**9]
print(*l)

Solution (Python):
import math
S = int(input())
v = 10**9
x3 = (v-S%v)%v
y3 = (S+x3)//v
print("0 0 %d 1 %d %d"%(10**9, x3, y3))

Solution (Python):
s=int(input())
large=10**9
if s==10**18:
    print(0,0,10**9,1,0,10**9)
else:
    y3=s//large+1
    x3=y3*large-s
    print(0,0,10**9,1,x3,y3)

Solution (Python):
import sys
sys.setrecursionlimit(4100000)

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)


def divisor(n: int):
    """1からsqrt(n)までの約数を全部返す
    
    Args:
        n (int): [description]
    
    Yields:
        int: [description]
    """
    for i in range(1, math.ceil(math.sqrt(n)) + 1):
        if n % i == 0:
            yield i


def resolve():
    
    S = [int(x) for x in sys.stdin.readline().split()][0]  
    
    

    
    
    
    

    logger.debug('{}'.format([]))

    if S <= 10**9:
        y = 1
        x = S
        print(' '.join([str(i) for i in [0, 0, x, 0, 0, y]]))
        return

    x = 10**9
    y = math.ceil(S / 10**9)

    a = 1
    b = x * y - S

    logger.debug('{}'.format([x * y - a * b]))

    print(' '.join([str(i) for i in [0, 0, x, a, b, y]]))


if __name__ == "__main__":
    resolve()





import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3"""
        output = """1 0 2 2 0 1"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """100"""
        output = """0 0 10 0 0 10"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """311114770564041497"""
        output = """314159265 358979323 846264338 327950288 419716939 937510582"""
        self.assertIO(input, output)

Solution (Python):
S=int(input())    
a=S%(10**9)
b=(10**9-a)%(10**9)
print(0,0,1,10**9,(S+b)//(10**9),b)

Solution (Python):
s = int(input())
if s<=10**9:
    print(0,0,0,1,s,0)
    exit()
bx=10**9
by=1
ay=int(s/(10**9))
while True:
    ax = ay*bx-s
    if ax >= 0 and ax <= 10**9:
        break
    else:
        ay+=1
print(0,0,bx,by,ax,ay)

Solution (Python):
S = int(input())




Y3 = (S + 10**9 - 1) // 10**9
Y2 = 10**9 * Y3 - S
print(0, 0, 10**9, Y2, 1, Y3)

Solution (Python):
s = int(input())

v = 10 ** 9

x = (v - s%v) % v
y = (s + x) // v  
 
print(0, 0, 10 ** 9, 1, x, y)

Solution (Python):
S=int(input())
X=(S+10**9-1)//(10**9)
print(0,0,X,1,X*10**9-S,10**9)

Solution (Python):
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()






def main():
  s=I()
  x1=0
  y1=0
  x2=10**9
  x3=1
  y3=(s+x2-1)//x2
  y2=x2*y3-s

  print(x1,y1,x2,y2,x3,y3)

main()

Solution (Python):
S = int(input())
x1 = 0
y1 = 0
x2 = 10**9
y2 = 1
x3 = (x2-S%x2)%x2
y3 = -(-S//x2)
print(x1,y1,x2,y2,x3,y3)

Solution (Python):
import math

area = int(input())

sq = int(math.sqrt(area))









if area == 10 ** 18:
    li = [0, 0, 0, 10**9, 10**9, 10**9]
elif (sq ** 2) <= area <= sq * (sq + 1):
    
    li = [0, 0, sq, 1, sq * (sq + 1) - area, sq + 1]
elif sq * (sq + 1) <= area <= (sq + 1) ** 2:
    li = [0, 1, sq+1, 0, -(sq * (sq + 1) - area), sq + 1]

print(' '.join(map(str, li)))

Solution (Python):
S = int(input())
v = 10 ** 9
x = (v - S % v) % v
y = (S + x) // v
print(0, 0, 10 ** 9, 1, x, y)

Solution (Python):
s = int(input())
a = 10**9
if s == 10**18:
    print(0, 0, a, 0, 0, a)
else:
    x3 = a-(s%a)
    y3 = (s+x3)//a
    print(0, 0, a, 1, x3, y3)

Solution (Python):
s = int(input())

x1 = 10**9
y1 = 1
x2 = (10**9 - s%10**9)%10**9
y2 = (s+x2) // 10**9

print(0, 0, x1, y1, x2, y2)

Solution (Python):
s = int(input())
n = 1000000000
x = (n-s%n)%n
y = (s+x)//n
print(*[1,n,y,x,0,0])

Solution (Python):
n=int(input())
a=-(-n//10**9)
b=10**9*a-n
print(0,0,10**9,1,b,a)

Solution (Python):
from sys import stdin
s = int(stdin.readline().rstrip())
if s == 10**18:
    print(0,0,10**9,0,0,10**9)
    exit()
a = s//10**9+1
b = 10**9-s%10**9
print(0,0,10**9,1,b,a)

Solution (Python):
s = int(input())
x1 = 10**9
x2 = 1
def ceil(a, b):
   return a // b + (a % b > 0)

y2 = ceil(s, x1)
y1 = 10**9 - s % 10**9
if y1 == 10**9:
    y1 = 0
print(0)
print(0)
print(x1)
print(y1)
print(x2)
print(y2)

Solution (Python):



"""
考察

一点を(0,0におくと)
s / 2 = abs(x1*y2 - x2*y1) / 2
abs(x1*y2 - x2*y1) = s
(x1,y1)になにか入れてみるとして、0を入れると点2のx,yどっちかが消えるので良くない
また、absが邪魔なので、absの一項目を大きくとって、二項目をちいさくとりたい。
ので、10**9 * y2 - x2 = sとする。
s = 10**9 * y2 + x2 ならsを10**9で割った商と余りなのだけども。

s / 10**9 = a あまり bとして、
s / 10**9 = a + 1 あまり +(b-10**9) だから、
y2 = a+1, x2 = 10**9 - b
かな
ただしSが10**9で割り切れるときは x2 = 0
"""

S = int(input())
x0,y0,x1,y1 = 0,0,10**9,1

if S % 10**9 == 0:
    x2, y2 = 0, S // 10**9
else:
    x2, y2 = 10**9 - (S % 10**9), S // 10**9 + 1

print(x0,y0,x1,y1,x2,y2)

Solution (Python):
S = int(input())
x0,y0,x1,y1 = 0,0,10**9,1

if S % 10**9 == 0:
    x2, y2 = 0, S // 10**9
else:
    x2, y2 = 10**9 - (S % 10**9), S // 10**9 + 1

print(x0,y0,x1,y1,x2,y2)

Solution (Python):
import math

N = int(input())
a = math.ceil(N/(10**9))
b = a*10**9-N
print(0, 0, 10**9, b, 1, a)

Solution (Python):
N = int(input())
a = -(-N//(10**9))
b = a*10**9-N
print(0, 0, 10**9, b, 1, a)

Solution (Python):
s = int(input())
m = 10**9
x = (m-s%m)%m
y = (s+x)//m
print(0,0,10**9,1,x,y)

Solution (Python):
S = int(input())

if S <= 10**9:
    print(0,0,S,0,0,1)
else:
    if S != 10**18:
        y = (S + 10**9) // 10**9
        x = abs((10**9) * y - S)
        print(0,0,10**9,1,x,y)
    else:
        print(0,0,10**9,0,0,10**9)

Solution (Python):
s = int(input())
l, r = 1, int(1e9)
while l+1 < r:
    m = l+r >> 1
    if m*m <= s:
        l = m
    else:
        r = m
print(0, 0, r, 1, r*r-s, r)

Solution (Python):
S = int(input())

y = (S+10**9-1)//10**9
x = y*(10**9)-S

print(0,0,10**9,1,x,y)

Solution (Python):
S = int(input())

l = [0,0]
if S <= 10 ** 9:
    a = [S, 0, 0, 1]
else:
    u = S // 10 ** 9
    if S % 10 ** 9 != 0:
        u += 1
    d = u * (10 ** 9) - S
    a = [u, d, 1, 10 ** 9]
l.extend(a)
print(" ".join(map(str, l)))

Solution (Python):
S = int(input())
m = 10**9
x = (m - S % m) % m
y = (S + x) // m
print(0, 0, m, 1, x, y)

Solution (Python):
s = int(input())
if s == 10**18:
    x = 0
    y = s//(10**9)
else:
    x = 10**9-s%(10**9)
    y = s//(10**9) +1
print(0,0,10**9,1,x,y)

Solution (Python):
n = int(input())
z = 1000000000
 
if n==z*z:
	print(z, 0, 0, z, 0, 0)
elif n > z:
    a = n//z
    b = n%z
    print(a+1, b, 0, z, 1, 0)
else:
    print(n, 0, 1, 1, 0, 0)

Solution (Python):
S = int(input())

x1,y1 = 0,0
x2 = 10**9
y2 =1
y3,x3 = divmod(-S,x2)
y3 *= -1
for a in [x1,y1,x2,y2,x3,y3]:
	if a == y3:
		print(a)
	else:
		print(a,end=" ")

Solution (Python):

s=int(input())
x1,y1=0,0
x2,y2=10**9,1
x3,y3=0,0
m=10**9
r=(m-s%m)%m
q=(s+r)/m
x3=int(r)
y3=int(q)
print(x1,y1,x2,y2,x3,y3)

Solution (Python):
S = int(input())
N = int(1e9)
x = N - (S - 1) % N - 1
y = (S - 1) // N + 1
print(0, 0, N, 1, x, y)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

def area(xy):
    xy = sorted(xy)
    x = [xy[i][0] - xy[0][0] for i in range(3)]
    y = [xy[i][1] - xy[0][1] for i in range(3)]
    return abs(x[1]*y[2] - x[2]*y[1]) / 2

def main():
    n = I()
    s = int(n**0.5) - 1
    while s*s < n:
        s += 1
    xy = [(0,0),(s,1),(s*s-n,s)]
    

    return JAA(xy," ", " ")


print(main())

Solution (Python):
s = int(input())

x =  (-s) % 10**9
y = (s + x) // 10**9

print(0,0,1,y,10**9,x)

Solution (Python):
S = int(input())

x2 = 10**9
x3 = (x2 - S%x2) % x2
y3 = (S + x3) // x2

print('0 0 {} 1 {} {}'.format(x2,x3,y3))

Solution (Python):
S = int(input())
if S<=10**9:
    print(0,0,0,1,S,0)
else:
    a = S%(10**9)
    x = 10**9
    y = 1
    if a==0:
        z = 0
    else:
        z = 10**9-a
    w = (S+y*z)//(10**9)
    print(0,0,x,y,z,w)

Solution (Python):
n=int(input())
a = n//(10**9)+1
b = 10**9-(n%(10**9))
if n%(10**9) == 0:
  print(0,0,10**9,0,1,a-1)
else:
  print(0,0,10**9,b,1,a)

Solution (Python):
s=int(input())
ans1=s//10**9+1
ans2=10**9-s%10**9
if s==10**18:
  print(0,0,10**9,0,0,10**9)
else:
  print(0,0,10**9,1,ans2,ans1)

Solution (Python):
S=int(input())





Y1=10**9-S%(10**9) if S%10**9 else 0
Y2=(S+Y1)//(10**9)
print(10**9,Y1,1,Y2,0,0)

Solution (Python):
s = int(input().strip())
m = int(1e9)
if s % m == 0:
  x = 0
  y = s//m
else:
  x = m-(s%m)
  y = (s//m)+1
print(0,0,1000000000,1,x,y)

Solution (Python):
def examA():
    S = I()
    X = [0,10**9,0]; Y = [0,1,0]
    X[2] = -S%(10**9)
    Y[2] = (S-1)//(10**9) +1

    print(X[0],Y[0],X[1],Y[1],X[2],Y[2])
    return

def examB():
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,inf
mod = 10**9 + 7
inf = 10**18

if __name__ == '__main__':
    examA()

Solution (Python):
import math
S = int(input())
x1 = 10**9
y2 = math.ceil(S/x1)
x2 = 1
y1 = x1*y2 - S
x3,y3 = 0,0
print(x1,y1,x2,y2,x3,y3)

Solution (Python):
S=int(input())
x1 = y1 = 0
x2 = 10**9
y2 = 1
y3 = -(-S // (10**9))
x3 = y3 * 10**9 - S
print(x1,y1,x2,y2,x3,y3)

Solution (Python):
import math
s = int(input())
a = math.ceil(s / (10 ** 9))
b = (10 ** 9) * a - s
print(0, 0, 10 ** 9, 1, b, a)

Solution (Python):
S = int(input())





from math import ceil

Y3 = ceil(S/(10**9))
X3 = Y3*(10**9) - S

print(0,0,10**9,1,X3,Y3)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = int(read())

A = 10 ** 9; B = 1
D = (S + (-S) % A) // A
C = (A * D - S) // B

print(0,0,A,B,C,D)

Solution (Python):
'''
　 ∧_,,∧    究極奥義「WAがACになーれ！！」
　（`・ω・)つ━☆・*。
　⊂　　 ノ 　　　・゜+.
　 し’´Ｊ　　*・ 
'''
import sys
input = sys.stdin.readline
n=int(input())
if n==10**18:
    print(0,0,0,10**9,10**9,0)
    exit()
print(0,0,10**9,1,10**9-n%10**9,1+n//10**9)

Solution (Python):

import sys


def solve(S: int):
    def divisor(n): 

        i = 1
        while i * i <= n:
            if n%i == 0:
                if 0<= i <= 10**9 and 0 <= n//i <=10**9:
                    return i
            i += 1
    

    if int(S**(1/2))**2 == S:
        half  =int(S**(1/2))
        b = c = 0
    else:
        half = int(S**(1/2))+1
        res = half**2-S
        num = divisor(res)
        b = num
        c = res//num

    a = d = half 

    print(0,0,a,b,c,d)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = int(next(tokens))  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
s = int(input())
l, r = 1, int(1e9)
while l+1 < r:
    m = l+r >> 1
    if m*m <= s:
        l = m
    else:
        r = m
print(0, 0, r, 1, r*r-s, r)

Solution (Python):
s=int(input())
print(0,0,10**9,1,-s%10**9,-(-s//10**9))

Solution (Python):
s=int(input())

t=int(s**.5)
if t**2>=s:
    t-=1

if t*(t+1)<s:
    x1,y2=t+1,t+1
else:
    x1,y2=t,t+1

x2=x1*y2-s
y1=1

print(0,0,x1,y1,x2,y2)

Solution (Python):
S = int(input())
X1 = 0
Y1 = 0
if S <= 10**9:
    X2 = S
    Y2 = 0
    X3 = 0
    Y3 = 1
elif 10**9 < S < 10**18:
    T = S % 10**9
    X2 = 10**9
    Y3 = (S // 10**9) + 1
    X3 = 10**9 - T 
    Y2 = 1
else:
  X2 = 0
  Y2 = 10**9
  X3 = 10**9
  Y3 = 0
print(X1,Y1,X2,Y2,X3,Y3)

Solution (Python):
s = int(input())

div = s // 10**9
mod = s % 10**9
if mod == 0:
    print(0, 0, 10**9, 1, 0, div)
else:
    print(0, 0, 10**9, 1, 10 ** 9 - mod, div + 1)

Solution (Python):
s = int(input())
M = 10**9
print(0, 0, M, 1, -s%M, -(-s//M))

Solution (Python):
import numpy as np
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

S = int(input())
T = S**0.5

if int(T)**2 != S:
    T = int(T)+1
    U = int(T**2 - S)
    dv = make_divisors(U)
    rootU = int(U**0.5)
    idx = 0
    a = 10**9
    for i in range(len(dv)):
        if abs(dv[i]-rootU) <= a:
            a = abs(dv[i]-rootU)
            idx = i
    a = dv[idx]
    b = int(U/a)
    res = ['0', '0', str(T), str(a), str(b), str(T)]
    print(' '.join(res))
else:
    T = int(T)
    res = ['0', '0', str(T), '0', '0', str(T)]
    print(' '.join(res))

Solution (Python):
s = int(input())

t = [0, 0, 10 ** 9, 1, None, None]
t[5] = (s + 10 ** 9 - 1) // 10 ** 9
t[4] = (10 ** 9 * t[5]) - s

print(*t)

Solution (Python):
S=int(input())

if S<10**18:
    X1,Y1=0,0

    mod=10**9

    X2=mod
    Y3=S//mod + 1

    Y2=1
    X3=mod-S%mod
else:
    X1,Y1,X2,Y3=0,0,0,0
    Y2=10**9
    X3=10**9

print(X1,Y1,X2,Y2,X3,Y3)

Solution (Python):
from math import sqrt
s = int(input())
a = 10**9
b = s // a
c = s % a
if(c != 0):
    b += 1
    c = a - c

print(0,0,a,1,c,b)

Solution (Python):
s = int(input())

if s == 10 ** 18:
    x1, y1 = 10 ** 9, 0
    x2, y2 = 0, 10 ** 9
else:
    x1 = 10 ** 9
    y1 = 1
    div, mod = divmod(s, x1)
    x2 = x1 - mod
    y2 = div + y1

print(*[0, 0, 10**9, 1, x2, y2])

Solution (Python):
import cmath
import sys

INF=10**18
MOD=998244353
MAX=10**5+7

def main():
    S=int(input())

    l=1
    r=10**9

    while l+1<r:
        mid=(l+r)//2
        if mid*mid<=S:
            l=mid
        else:
            r=mid

    ans=[0, 0, r, 1, r*r-S, r]
    print(*ans)

if __name__=='__main__':
    main()

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    s=int(input())
    x0=10**9
    y1=(s-1)//x0+1
    x1=1
    y0=x0*y1-s
    print(0,0,x0,y0,x1,y1)
resolve()

Solution (Python):
import math 
MOD = int(1e9)

s = int(input())
if s==1000000000000000000:
    ans = [0,0,MOD,0,0,MOD]
    print(*ans)
    exit()

ans = [0,0,MOD,1]
x,y = 0,0
y = s//MOD + 1
x = MOD - s%MOD
ans.append(x)
ans.append(y)
print(*ans)

Solution (Python):
S = int(input())  
    
if S == 10**18:
    X2 = 10**9
    Y3 = 10**9
    Y2 = 0
    X3 = 0
elif S > 10**9:
    r = 10**9 - (S % 10**9)
    Y2 = r
    X3 = 1
    S += r
    X2 = S //10**9
    Y3 = 10**9
else:
    Y2 = 0
    X3 = 0
    X2 = S
    Y3 = 1

        
print(0, 0, X2, Y2, X3, Y3)

Solution (Python):
s=int(input())
if s%(10**9)==0:
  print(0,end=" ")
  print(0,end=" ")
  print(10**9,end=" ")
  print(0,end=" ")
  print(0,end=" ")
  print(s//(10**9))
else:
  print(0,end=" ")
  print(0,end=" ")
  print(10**9,end=" ")
  print(1,end=" ")
  print(10**9-s%(10**9),end=" ")
  print(s//(10**9)+1)

Solution (Python):
s=int(input())
if s%(10**9)==0:
  print(0,end=" ")
  print(0,end=" ")
  print(10**9,end=" ")
  print(0,end=" ")
  print(0,end=" ")
  print(s//(10**9))
else:
  print(0,end=" ")
  print(0,end=" ")
  print(10**9,end=" ")
  print(1,end=" ")
  print(10**9-s%(10**9),end=" ")
  print(s//(10**9)+1)