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):
S = int(input())
x2 = 1000000000
x3 = 1
y3 = S // x2
if S % x2 != 0:
    y3 += 1
y2 = (x2 * y3) - S
print(0, 0, x2, y2, x3, y3)

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

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

if __name__ == "__main__":
    main()

Solution (Python):
s = int(input())
x0 = 0 
y0 = 0
x1 = 10 ** 9
y1 = 1
y2 = ( s - 1 ) // x1 + 1
x2 = x1 * y2 - s
print(x0, y0, x1, y1, x2, y2)

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

if s == 10**18:
    print(0,0,10**9,0,0,10**9)
    exit()
x1 = 10**9
if s%x1 == 0:
    y2 = s//x1
else:
    y2 = s//x1 + 1
r = x1*y2-s

x2 = 1
y1 = r
print(0,0,x1,y1,x2,y2)

Solution (Python):
a = int(input())
ax = ay = 0
bx = 1
by = 10 ** 9
cx = (a + by - 1) // by
cy = cx * by - a
print(ax, ay, bx, by, cx, cy)

Solution (Python):
def calc(x1, y1, x2, y2, x3, y3):
    point_list = [x1, y1, x2, y2, x3, y3]
    point_list = [str(i) for i in point_list]
    print(" ".join(point_list))

s = int(input())
inf = 10 ** 9
if s >= inf:
    x1 = 0
    y1 = 0
    x2 = inf
    y2 = 1
    y3 = (s // inf) + 1 
    x3 = inf - (s % inf)
    if (abs(y3) <= inf) & (abs(x3) <= inf):
        calc(x1, y1, x2, y2, x3, y3)
    else:
        x1 = 0
        y1 = 0
        x2 = inf
        y2 = 1
        y3 = s // inf
        x3 = s % inf
        calc(x1, y1, x2, y2, x3, y3)
else:
    x1 = 0
    y1 = 0
    x2 = inf
    y2 = 1
    y3 = 0
    x3 = s
    calc(x1, y1, x2, y2, x3, y3)

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

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

if S <= 10 ** 9:
    a = S
    b = c = 0
    d = 1
else:
    q = S % (10 ** 9)
    if q == 0:
        a = S // (10 ** 9)
        b = c = 0
        d = 10 ** 9
    else:
        b = 1
        c = 10 ** 9 - q
        d = 10 ** 9
        a = (S+c) // 10 ** 9


print("{} {} {} {} {} {}".format(0, 0, a, b, c, d))

Solution (Python):
import math

S = int(input())

x = math.ceil(math.sqrt(S))

diff = x * x - S
if diff <= 10 ** 9:
    print(0, 0, x, 1, diff, x)
else:
    p = int(math.sqrt(diff))
    print(0, 0, x + p, 1, diff - p * p, x - p)

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

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

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

Solution (Python):
s = int(input())
b = int(1e9)
a = s // b
if a * b < s:
	a += 1
x, y = 1, a * b - s
print("0 0 %d %d %d %d" % (x, b, a, y))

'''
a, b
(0, 0), (x, b), (a, y)
s = a * b - x * y

2*a*b-(a-x)*b-a*(b-y)-x*y=s
x*b+y*a-x*y=s
'''

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

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

v = 1000000000

x = int(v - (S % v)) % v
y = int((S+x)/v)

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

Solution (Python):
a = int(input())
ax = 0
ay = 0
bx = 10 ** 9
by = 1
cy = (a + bx - 1) // bx
cx = cy * bx - a
print(ax, ay, bx, by, cx, cy)

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

v = 1000000000
x = int((v-S % v) % v)
y = int((S+x)/v)

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

Solution (Python):
from sys import stdin
S = int(stdin.readline().rstrip())
y = (S+10**9-1) // 10**9 
x = 10**9*y - S
print("%d %d %d %d %d %d" % (0, 0, 1, 10**9, y, x))

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

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

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

Solution (Python):
s = int(input())
xy = [0, 0, 10**9, 1, 0, 0]

m = s % xy[2]
d = s // xy[2]

xy[4] = 0 if m == 0 else (xy[2] - m)
xy[5] = d if m == 0 else (d + 1)

print(*xy)

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

Solution (Python):
import math

s = int(input())
x2 = math.ceil(math.sqrt(s))
y3 = x2
ds = x2 ** 2 - s
x3 = ds

print('0 0 ' + str(x2) + ' 1 ' + str(x3) + ' ' + str(y3))

Solution (Python):

import sys
sys.setrecursionlimit(10**7)
import math
from collections import defaultdict


mod = 10**9 + 7


def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
  read_all = [tuple(map(int, input().split())) for _ in range(N)]
  return map(list,zip(*read_all))



import math

S = I()
print(0,0,10**9,1,10**9*math.ceil(S/10**9)-S,math.ceil(S/10**9))

Solution (Python):
n=int(input())
m=1000000000
l=[0,0]
if(n<=m):
    l.append(1)
    l.append(0)
    l.append(0)
    l.append(n)
elif(n == 1000000000000000000):
    l.append(m)
    l.append(0)
    l.append(0)
    l.append(m)
else:
    l.append(m)
    l.append(1)
    x=n%m
    l.append(m-x)
    l.append(((n)//m)+1)
for i in l:
    print(i,end=" ")

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

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

Solution (Python):
import math
s=int(input())
lim=10**9
n=math.ceil(s**0.5)
print(0, 0, n, 1, n**2-s, n)

Solution (Python):
M = 10**9
S = int(input())
q, r = divmod(S, M)
x1, y1 = 0, 0
if r == 0:
    x2, y2, x3, y3 = M, 0, 0, q
else:
    x2, y2, x3, y3 = M, M - r, 1, q + 1
print(x1, y1, x2, y2, x3, y3)

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

Solution (Python):
from math import sqrt
S = int(input())
A = int(sqrt(S))
while S - A * A > 0:
    A += 1
print(0, 0, A, A * A - S, 1, A)

Solution (Python):
import sys, math, itertools, bisect, copy, re
from collections import Counter, deque, defaultdict






INF = float('inf')
MOD = 10 ** 9 + 7
EPS = 10 ** -7
sys.setrecursionlimit(1000000)








S = int(input())

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

if S == 1000000000000000000:
    x2 = 10 ** 9
    y2 = 0
    x3 = 0
    y3 = 10 ** 9

print("{} {} {} {} {} {}".format(0, 0, x2, y2, x3, y3))

Solution (Python):
s=int(input())
a=0
b=0
c=1
d=10**9
e=(s-1)//d+1
f=e*d-s
print(a,b,c,d,e,f)

Solution (Python):

S = int(input()) - 1
r = 10**9
print('{} 0 0 1 {} {}'.format(r,S%r+1,S//r+1))

Solution (Python):

"""
Created on Sun Jul 21 23:52:50 2019

@author: Yamazaki Kenichi
"""

S = int(input())
r = 10**9

a = (S-1) % r +1
b = (S-1) // r + 1
print('{} 0 0 1 {} {}'.format(r,a,b))

Solution (Python):
import math
S = int(input())
X2 = 0
Y2 = 0
X3 = 0
Y3 = 0
if S == 10 ** 18:
    X2 = 10 ** 9
    Y3 = 10 ** 9
else:
    X2 = int(math.sqrt(S) + 1)
    Y3 = X2
    s = X2 ** 2  - S 
    for i in range(1, int(math.sqrt(s) + 1)):
        if s%i == 0 and s//i <= 10 ** 9 and i <= 10 ** 9:
            X3 = i
            Y2 = s//i
            break

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

Solution (Python):


import math


S = int(input())
x1,y1,x2,y2 = [1,10**9,0,0]
x2 = math.ceil(S/10**9)
y2 = x2*10**9-S
print(0,0,x1,y1,x2,y2)

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

print(0, 0, 10**9, 1, (-s) % 10**9, -(-s // 10**9))

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





x0 = 0
y0 = 0
x1 = 10**9
y1 = 1
y2 = (S-1) // x1 + 1
x2 = x1*y2 - S

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

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

I = 10**9
if s % I != 0:
    x = I - s % I
    y = math.ceil(s/I)

else:
    x = 0
    y = s // I

print(0, 0, I, 1, x, y)

Solution (Python):
import math

S = int(input())

ans = [0, 0]
if S <= 10 ** 9:
    ans += [S, 0, 0, 1]
else:
    root = math.ceil(math.sqrt(S))
    ans += [root ** 2 - S, root, root, 1]

print(*ans)

Solution (Python):
import logging
import math

logging.basicConfig(level=logging.INFO, format="%(message)s")

            
def main():
    S = int(input())
    logging.info("Hello!")

    if S < 10 ** 9:
        print("0 0 1 0 1 " + str(S))
    else:
        X_3 =  10 ** 9 - (S % (10 ** 9))

        if X_3 == 10 ** 9:
            Y_3 = int(S / (10 ** 9))
            X_3 = 0
        else:
            Y_3 = int(S / (10 ** 9)) + 1
        
        
        print("0 0 1000000000 1 " + str(X_3) + " " + str(Y_3))
        
        
if __name__ == "__main__":
    main()

Solution (Python):
M = 10**9
S = int(input())
N,r = divmod(S,M)
if r != 0:
    d = M - r
    N += 1
else:
    d = 0
ans = [N,1,d,M,0,0]
print(" ".join(map(str,ans)))

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

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

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

x3, y3 = divmod(S, -y2)
x3, y3 = -x3, -y3

print(x1, y1, x2, y2, x3, 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())

A = 10**9
C = S//A
B = S%A

if B!=0:
  C += 1
  B = A - B

ANS = [0, 0, A, 1, B, C]
print(*ANS)

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

def solve():
  s = int(input())
  if s <= 10**9:
    print("0 0 1 0 1",end =" ")
    print(s)
  else:
    print("0 0 1000000000 1",end=" ")
    c = (s+1000000000-1)//1000000000
    print(1000000000*c-s,end =" ")
    print(c)
    
solve()

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

y = -(-S // (10**9))
x = y * (10**9) - S
    
print(0, 0, 10**9, 1, x, y)

Solution (Python):


from operator import itemgetter

s = int(input())



a=((s-1)//1000000000)+1
b=a*1000000000-s

print("0 0 1000000000 {} 1 {}".format(b,a))

Solution (Python):
import math
n = int(input())
mx = 1000000000

if n<mx:
    print(0, 0, 1, 0, 1, n)
else:
    mul = math.ceil((n*1.0)/mx)
    x3= mx*mul-n
    print(0,0,mx,1,x3,mul)

Solution (Python):
s = int(input())
ans = [0,0,0,0,0,0]
if s > 10**9:
    a = 10**9
    d = s//a + 1
    b = 1
    c = a*d - s
    if d > 10**9:
        d = s//a
        b = 0
        c = a*d - s
else:
    a = 1
    d = s
    b = 0
    c = 0
print(0,0,a,b,c,d)

Solution (Python):
import sys,heapq,math
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
def ddprint(x):
  if DBG:
    print(x)

s = inn()
q = int(math.sqrt(s))
if s == 10**18:
    print("0 0 0 1000000000 1000000000 0")
elif s < q*(q+1):
    i = s-q*q+1
    print("0 0 1 {} {} {}".format(q+1,q,q+1-i))
else:
    i = s-q*(q+1)
    print("0 0 1 {} {} {}".format(q+1,q+1,q+1-i))

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

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

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

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

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

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

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

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

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

Solution (Python):
from math import ceil
S = int(input())
Y = int(ceil(S / (10**9)))
X = Y*(10**9) - S
print(0,0,10**9,1,X,Y)

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

Solution (Python):
dekai=10**9
s=int(input())
ans=[0,0,dekai,1,0,s//dekai]
if s%dekai:
  ans[5]+=1
ans[4]=dekai*ans[5]-s
print(*ans)

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

if S == 10**18:
  x1,y1 = 0,0
  x2 = 10**9
  y3 = 10**9
  x3 = 0
  y2 = 0

else:
  x1, y1 = 0,0



  x2 = 10**9
  y2 = 1



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

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

Solution (Python):

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

Solution (Python):
import math
s=int(input())
print(0,0,1,1000000000,(s-1)//1000000000+1,((s-1)//1000000000+1)*1000000000-s)

Solution (Python):
import sys
LIM = 1000000000


def input():
    return sys.stdin.readline().rstrip()


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

    x1 = 0 if s == LIM * LIM else 1
    y1 = 0
    x2 = min((s // LIM) + 1, LIM)
    y2 = s % LIM
    x3 = 0
    y3 = LIM
    print(x1, y1, x2, y2, x3, y3)


main()

Solution (Python):

import math

def main():
    s = int(input())
    max_num = 10 ** 9
    y = math.ceil(s / (max_num))
    x = y * max_num - s

    print(0, 0, max_num, 1, x, y)




if __name__ == '__main__':
    main()

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

a = S//(10**9)
if S % (10**9) != 0 :
    a += 1

b = (10**9) * a - S

print(0,0,10**9,1,b,a)

Solution (Python):
S = int(input())
MOD = 10**9

y2 = -(-S // 10**9)
x2 = -(S - y2 * (10**9))

print('0 0 {} 1 {} {}'.format(MOD, x2, y2))

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

a = s // 10**9 + 1
b = 10**9 - s % 10**9
if a > 10**9:
  a -= 1
  b -= 10**9

assert abs(a * 10**9 - b) == s

print(" ".join(map(str, [0, 0, a, 1, b, 10**9])))

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)


def A():
    n = I()
    if n <= 1000000000:
        print(0,0,1,0,0,n)
    else:
        b = 1000000000
        a = 1
        y = -n%1000000000
        x = (n+a*y)//b
        print(0,0,x,y,a,b)
        return

    return


def B():
    n,k = LI()
    a = LI()
    s = []
    f = [1]*1000000
    for i in range(k):
        for j in range(n):
            aj = a[j]
            if f[aj]:
                s.append(aj)
                f[aj] = 0
            else:
                while 1:
                    x = s.pop(-1)
                    f[x] = 1
                    if x == aj:
                        break
        print(i+1,s)
    return


mod = 998244353
def C():
    def comb(a,b):
        if a < b:
            return 1
        return fact[a]*inv[b]*inv[a-b]%mod
    n,m = LI()
    MA = 3*m+max(n,2*m)-1
    fact = [1]*(MA+1)
    for i in range(MA):
        fact[i+1] = fact[i]*(i+1)%mod
    inv = [1]*(MA+1)
    inv[MA] = pow(fact[MA],mod-2,mod)
    for i in range(MA)[::-1]:
        inv[i] = inv[i+1]*(i+1)%mod
    ans = 0
    for k in range(min(m,n)+1):
        if (3*m-k)%2 == 0:
            ans += comb(n,k)*comb((3*m-k)//2+n-1,n-1)
            ans %= mod
    ans -= n*comb(3*m-(2*m+1)+n-1,n-1)
    ans %= mod
    print(ans)

    return


def D():
    return


def E():
    n = I()

    return


def F():
    n = I()

    return


if __name__ == "__main__":
    A()

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

y2 = n//(10**9)
if n%(10**9):
    y1 = 10**9 - n%(10**9)
    y2+=1
else:
    y1 = 0
print(0,0,10**9,y1,1,y2)

Solution (Python):
import sys
import math

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    S = INT()
    x0 = 0
    y0 = 0
    x1 = 10**9
    y1 = 1
    if S % 10**9 == 0:
        y2 = S // 10**9
        x2 = 0
    else:
        y2 = S // 10**9 + 1
        x2 = 10**9 - S % 10**9
    X = [x0, y0, x1, y1, x2, y2]
    print(*X)

if __name__ == '__main__':
    main()

Solution (Python):
from math import ceil
S = int(input())
if S == 10**18:
    print(0,0,10**9,0,0,10**9)
    exit(0)

y = ceil(S/(10**9))
x = (10**9)*y - S
print(0,0,10**9,1,x,y)

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

v = 10**9

x = (v-S%v)%v
y = int((S+x)/v)

print(*[0, 0, v, 1, x, y])

Solution (Python):
from math import ceil, floor, sqrt
s = int(input())
x1 = 1000000000
y1 = 1
y2 = (s + x1 - 1) // x1
x2 = x1 * y2 - s

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

Solution (Python):
def main():
  s = int(input())
  ppp = pow(10, 9)
  y = (s+ppp-1)//ppp
  x = ppp*y - s
  print("%d %d %d %d %d %d" % (0, 0, ppp, 1, x, y))


if __name__ == '__main__':
  main()

Solution (Python):
def main():
  s = int(input())
  ppp = pow(10, 9)
  x = (ppp-s%ppp)%ppp
  y = (s+x) // ppp
  print("%d %d %d %d %d %d" % (0, 0, ppp, 1, x, y))


if __name__ == '__main__':
  main()

Solution (Python):
from math import sqrt
S=int(input())
k=int(sqrt(S))
if S-k*k > 1e9:
  k+=1
d=S-k*k
if d<=0:
  print(0,0,k,1,-d,k)
else:
  print(0,1,k,0,d,k+1)

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

Solution (Python):



import sys
import math
import bisect
from heapq import heappush, heappop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
mod = 10**9 + 7

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

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

S=INT()
MAX=10**9

x1, y1 = 0, 0
x2, y2 = MAX, 1
x3 = MAX-S%MAX if S%MAX!=0 else 0
y3 = ceil(S, MAX)

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

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

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

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

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

Solution (Python):
S=int(input())
x_1=0
y_1=0
x_2=10**9
y_2=1

if S%10**9==0:
    x_3=0
    y_3=S//10**9
else:
    x_3=10**9-S%10**9
    y_3=1+S//10**9

print(x_1,y_1,x_2,y_2,x_3,y_3)

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

Solution (Python):
import math
s=int(input())
if s==1:
  print("0 0 1 0 0 1")
  exit()
c=math.ceil(math.sqrt(s))
sa=c**2-s
for i in range(1, s):
  if sa%i==0 and sa/i <= 10**9:
    print("0 0 {} {} {} {}".format(c, i, sa//i, c))
    exit()

Solution (Python):
import math

le = 10 ** 9
s = int(input())

y2 = math.ceil(s / le)
y1 = le * y2 - s

print(0, 0, 1000000000, y1, 1, y2)

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

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

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 sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y) -> int: return pow(x, y, DVSR)
def INV(x, d=DVSR) -> int: return pow(x, d - 2, d)
def DIV(x, y, d=DVSR) -> int: return (x * INV(y, d)) % d
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())

S=II()
DV=10**9
A=DV
B=(DV-(S%DV)) if S%DV else 0
C=1
D=(S+B)//A

print('0 0 {} {} {} {}'.format(A,B,C,D))

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

if S <= 10 ** 9:
    print(0, 0, S, 0, S, 1)
else:
    a = S // (10 ** 9)
    b = S % (10 ** 9)
    if b == 0:
        print(0, 0, 10 ** 9, 1, 0, a)
    else:
        print(0, 0, 10 ** 9, 1, 10 ** 9 - b, a + 1)

Solution (Python):


import sys

class ATriangle:
    def solve(self):
        import math
        s = int(input())
        x2 = math.ceil(s ** .5)
        y2 = 1
        y3 = math.ceil(s ** .5)
        x3 = x2 * y3 - s
        print(0, 0, x2, y2, x3, y3)


solver = ATriangle()
input = sys.stdin.readline

solver.solve()

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

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

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

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

Solution (Python):
import math
S = int(input())
a,b,c,d = 0,0,0,0
a = 10**9
d = math.ceil(S//a)+1
if S == 10**18:
    d = 10**9
c = (a*d)-S
b = 1
if S == 10**18:
    c,d = 0,10**9
print(0,0,a,b,c,d)

Solution (Python):
def a_triangle(S, M=10**9):
    q, r = divmod(S, M)
    y = q if r == 0 else q + 1
    x = M * y - S
    return '0 0 {0} 1 {1} {2}'.format(M, x, y)

S = int(input())
print(a_triangle(S))

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

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

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

Solution (Python):
import math
s = int(input())
r = math.floor(math.sqrt(s)) + 1
k = r**2 - s
if r == 10**9 + 1:
    print("{} {} {} {} {} {}".format(0, 0, 1,r - 1,r - 1, 0))
    exit()
def search_prime(k):
    p = math.floor(math.sqrt(k))
    for i in range(2,p + 1):
        if k % i == 0:
            return i
    return 1
prime = search_prime(k)
print("{} {} {} {} {} {}".format(0, 0, prime,r,r, int(k / prime)))

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

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

Solution (Python):
if __name__ == '__main__':
    S = int(input())

    x0 = 0
    x1 = 10**9
    x2 = 1
    y0 = 0
    y2 = (S + x1 - 1)//x1
    y1 = x1 * y2 - S

    print(str(x0) + ' ' + str(y0) + ' ' + str(x1) + ' ' + str(y1) + ' ' + str(x2) + ' ' + str(y2))

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

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

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

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


ans = '{} {} {} {} {} {}'.format(
    0,
    0,
    10**9,
    1,
    (
        0 if S == 10**18 else
        10**9 - S % 10**9
    ),
    min(S // 10**9 + 1, 10**9)
)

print(ans)

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

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    S = int(input())

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

    if S % x2 == 0:
        y2 = 0
        x3 = 0
        y3 = S // x2
    else:
        y2 = 1
        y3 = S // 10**9 + 1
        x3 = 10**9 * y3 - S

    print('{} {} {} {} {} {}'.format(x1, y1, x2, y2, x3, y3))


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    S = int(input())

    x1 = 0
    y1 = 0

    if S == 10**18:
        x2 = 10**9
        y2 = 0
        x3 = 0
        y3 = 10**9
    else:
        x2 = 10**9
        y2 = 1
        y3 = S // 10**9 + 1
        x3 = 10**9 * y3 - S

    print('{} {} {} {} {} {}'.format(x1, y1, x2, y2, x3, y3))


if __name__ == '__main__':
    main()

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

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

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

if S > 10 ** 9:
    X = (10 ** 9 - (S % (10 ** 9))) % (10 ** 9)
    Y = (S + X) // (10 ** 9)
    print(0, 0, 10 ** 9, 1, X, Y)
else:
    X = 1
    Y = S
    print(0, 0, X, 0, 0, Y)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys, math, bisect, random, itertools
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A(s):

    
    def fake():

        def pri(n, x):
            for i in range(2, int(math.sqrt(n))):
                if n % i == 0 and n // i <= x:
                    return [i, n // i]
            return [1, n]

        x = int(math.sqrt(s))
        if s < 10 ** 9:
            print(0, 0, 0, s, 1, 0)
            return
        while 1:
            X = x ** 2
            if X - s < 0:
                x += 1
                continue
            b = pri(X - s, x)
            if b:
                print(0, 0, x, int(b[0]), int(b[1]), x)
                return
            x += 1
        return

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



def B():
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return




if __name__ == '__main__':
    A(II())

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

print("{} {} {} {} {} {}".format(x1, y1, x2, y2, x3, y3))

Solution (Python):
def solve():
  S = int(input())
 
  if S == 10 ** 18:
    print('0 0 0 1000000000 1000000000 0')
  else:
    LIMIT = 10 ** 9
    a = S % LIMIT
    b = (S - a) // LIMIT + 1
    c = LIMIT - a
    print('0 0 1 1000000000 ' + str(b) + ' ' + str(c))
 
solve()

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

y = S // 10**9
x = S % 10**9

if y != 10**9:
    print("{} {} {} {} {} {}".format(0, 0, 10**9, 1, 10**9-x, y+1))
else:
    print("{} {} {} {} {} {}".format(0, 0, 10**9, 1, 0, 10**9))

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('{} {} {} {} {} {}'.format(x1,y1,x2,y2,x3,y3))

Solution (Python):
S=int(input())
a=10**9
b=0
c=S%a
d=S//a+1
if S==1000000000000000000:
    print(0,0,10**9,0,0,10**9)
else:
    print(0,1,a,b,c,d)

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

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

Solution (Python):
import sys,itertools,copy,math
input = sys.stdin.readline
S=int(input().strip())

y2=math.ceil(S/(10**9))
x2=y2*10**9-S

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

Solution (Python):

import sys
from operator import itemgetter
from fractions import gcd
from math import ceil, floor, sqrt
from copy import deepcopy
from collections import Counter, deque, defaultdict
import heapq
from functools import reduce
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()


def divisor(n):
    ret = list()
    for i in range(1, int(sqrt(n)) + 1):
        if n % i == 0:
            ret.append(i)
            
    return sorted(ret)


def main():
    S = ii()
    X1, Y1 = 0, 0
    if (S <= 10 ** 9):
        print(0, 0, S, 0, 0, 1)
        sys.exit()
    for i in range(floor(sqrt(S)) - 3, floor(sqrt(S)) + 100):
        if i * i >= S:
            n = i
            break
    print(0, 0, n, 1, n ** 2 - S, n)


if __name__ == '__main__':
    main()