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):
'''
　 ∧_,,∧    究極奥義「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):
S = int(input())
p = S%(10**9)
k = (S-p)//10**9
L = [0,0,10**9,1,10**9-p,(k+1)]
if S != 10**18:
  print(" ".join(map(str,L)))
else:
  L = [0,0,10**9,0,0,10**9]
  print(" ".join(map(str,L)))

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

import math
y3 = math.ceil(S / lim)
x3 = lim * y3 - S



ans = list(map(str, [0, 0, lim, 1, x3, y3]))
print(' '.join(ans))

Solution (Python):
import math
S = int(input())
ss = math.ceil(math.sqrt(S))
print('{} {} {} {} {} {}'.format(ss, ss ** 2 - S, 1, ss, 0, 0))

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

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

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

L_MAX = 10**9

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

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

Solution (Python):
def main():
    import math
    s = int(input())
    a = d = math.ceil(math.sqrt(s))
    b, c = 1, a*d-s
    print(0, 0, a, b, c, d)

if __name__ == "__main__":
    main()

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

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





X1, Y1 = 0, 0

X2 = 10**9
Y3 = -(-S//(10**9))

X3 = 1
Y2 = -(S%-(10**9))

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

Solution (Python):
S = int(input())
  
X1, Y1 = 0, 0

X2, Y3 = int(S ** (1 / 2)), int(S ** (1 / 2))

if X2 < 10 ** 9:
  X2 += 1
if Y3 < 10 ** 9:
  Y3 += 1
if X2 * Y3 >= S:  
  X3, Y2 = X2 * Y3 - S, 1

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

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

Solution (Python):
s = int(input())
x_1 = y_1 = 0
if s < 10**9:
    x_2 = y_3 = 0
    x_3 = s
    y_2 = 1
elif s == 10**18:
    x_2 = 10**9
    x_3 = 0
    y_2 = 0
    y_3 = 10**9
else:
    digitnum = len(str(s))
    y_2 = 10**(digitnum-9)
    x_3 = s//y_2 + 1
    x_2 = x_3*y_2 - s
    y_3 = 1

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

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

X1 = 0
Y1 = 0
X2 = 1000000000
Y2 = 1
X3 = S % 1000000000
Y3 = S // 1000000000
if (X3 != 0):
    Y3 += 1
    X3 = X2 - X3
print(X1, Y1, X2, Y2, X3, Y3)

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

ax = 10 ** 9
by = 10 ** 9

bx_x_ay = ax * by - s

q, r = divmod(bx_x_ay, 10 ** 9)
by -= q
bx = 1
ay = r

ans = (0, 0) + (ax, ay) + (bx, by)
print(*ans)

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

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

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

if __name__ == "__main__":
    main()

Solution (Python):
S = int(input())
X1, Y1, X2, Y2 = 0, 0, 10**9, 1
shou, amari = divmod(S, 10**9)
 
if amari == 0:
    Y3 = shou
    X3 = 0
else:
    Y3 = shou + 1
    X3 = -(amari - 10**9)
 
print(X1, Y1, X2, Y2, X3, Y3)

Solution (Python):
S = int(input())
M = 10**9
p = [0, 0, 1, M]
a, b = divmod(S-1, M)
print(a+1, M-b-1, *p)

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)
from math import sqrt

def get_yakusu(n):
    i = int(sqrt(n))
    while i > 0:
        if n // i > 10 ** 9:
            return -1, -1
        if n % i == 0:
            return i, n//i
        i -= 1

def rec(left, right, n, S, a):
    if left == right:
        return left
    mid = (left + right) // 2
    if mid <= n:
        return rec(mid, right, n)
    else:
        return rec(left, mid, n)

def main():
    S = int(input().strip())
    y2 = (S+10**9-1) // 10**9
    y1 = 10**9 * y2 - S
    print("0 0 {} {} {} {}".format(10**9, y1, 1, y2))

if __name__ == '__main__':
    main()

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

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

if S != 10 ** 18:
    q = S // 10 ** 9 + 1
    r = 10 ** 9 * q - S
else:
    q = S // 10 ** 9
    r = 10 ** 9 * q - S

print(0, 0, q, r, 1, 10 ** 9)

Solution (Python):


S=int(input())

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

Solution (Python):
S = int(input())
points = [0, 0, 10**9, 1]
q, r = divmod(S, 10**9)
points += [10**9 - r, q + 1] if r != 0 else [0, q]
print(*points)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a = b = c = d = e = f = 0
    c = 10 ** 9
    d = 1
    f = (n + c - 1) // c
    e = c * f - n
    print(a, b, c, d, e, f)


if __name__ == '__main__':
    slove()

Solution (Python):
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    S = int(input())
    x1, y1 = 0, 0

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

    return




def B():
    n, m, W = LI()
    dp = [[0 for i in range(W+1)] for j in range(n+1)]
    wl = []
    vl = []
    c = [0 for i in range(n+1)]
    for i in range(n):

        w, v = LI()
        wl.append(w)
        vl.append(v)
    for i in range(m):
        a, b = LI()

        wl[a-1] += wl[b-1]
        vl[a-1] += vl[b-1]
        wl[b-1] = wl[a-1]
        vl[b-1] = vl[a-1]
        c[a] += 1
        c[b] += 2
    w = [x for i, x in enumerate(wl) if c[i+1] <= 1]
    v = [x for i, x in enumerate(vl) if c[i+1] <= 1]

    for i in range(len(w)):

        for t in range(W+1):

            if t >= w[i]:
                dp[i+1][t] = max(dp[i][t], dp[i][t-w[i]]+v[i])
            else:
                dp[i+1][t] = dp[i][t]

    print(max(dp[len(w)]))
    return




def C():
    N = II()
    A = LI()
    J = [0] * N
    for i, n in enumerate(A):
        J[n-1] = i+1
    for s in J:
        print(s, end=" ")

    return




def D():
    A, B = map(int, input().split())
    g = gcd(A, B)
    
    
    sq = int(sqrt(g)) + 2
    ans = 1

    for i in range(2, sq):
        if g % i == 0:
            ans += 1
        while g % i == 0:
            g /= i

            
        if g == 1:
            break
        if i == sq - 1:
            
            ans += 1

    print(ans)

    return




def E():
    N, M = LI()
    bit_max = 1 << N
    dp = [[inf for i in range(bit_max)] for j in range(M+1)]
    dp[0][0] = 0

    for i in range(M):
        a, b = LI()

        c = LI()
        bit = 0

        for d in c:
            bit |= 1 << (d-1)

        for w in range(bit_max):

            t = w | bit
            cost = dp[i][w] + a

            dp[i+1][t] = min(dp[i+1][t], cost)

            dp[i+1][w] = min(dp[i][w], dp[i+1][w])

    print(-1) if dp[-1][-1] == inf else print(dp[-1][-1])

    return




def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    



def solution(S):
    
    import math

    vowels = "AIUEO"
    count = 0
    consonants = 0
    newC = []
    newV = []

    for i in S[:-1]:
        if i in vowels:
            count += 1
            newV.append(i)
        else:
            consonants += 1
            newC.append(i)

    if consonants < count or consonants - 2 > count:
        return 0

    a = math.factorial(len(set(newC))) * math.factorial(len(set(newV)))
    return a

    pass



if __name__ == '__main__':
    A()

Solution (Python):
import math
s=int(input())
n=int(math.sqrt(s))
number1=n**2
number2=(n+1)**2
if n!=10**9:
    x_1=0
    y_1=0
    
    if s-number1>=n+1:
        x_3=n+1
        y_2=n+1
        x_2=1
        y_3=(n+1)**2-s
    
    elif s-number1<=n:
        x_3=n
        y_2=n+1
        y_3=n*(n+1)-s
        x_2=1
    lists=[x_1,y_1,x_2,y_2,x_3,y_3]    
    print(*lists)
if n==10**9:
    lists=[0,0,0,10**9,10**9,0]
    print(*lists)

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

Solution (Python):
import math

s = int(input())
p = math.ceil(s**0.5)

if p*(p-1) > s:
    print(0,0,p,p*(p-1)-s,1,p-1)
else:
    print(0,0,p,p**2-s,1,p)

Solution (Python):
import math

s = int(input())
if s == 10**18:
    print("0 0 0 1000000000 1000000000 0")
else:
    x2 = 10**9
    y2 = 1

    x3 = 10 ** 9 - s % 10**9
    y3 = s // 10**9 + 1

    print("0 0 1000000000 1 "+str(x3)+" "+str(y3))

Solution (Python):
from math import ceil


S = int(raw_input())

x2 = y3 = int(ceil(S ** 0.5))

y2 = x2 * y3 - S 
x3 = 1

print 0, 0, x2, y2, x3, y3

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

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

if s <= 10 ** 9:
    print(0,0,0,1,s,0)
    exit()
elif s == 10 ** 18:
    print(0,0,10**9,0,0,10**9)
    exit()

x2 = 10 ** 9
y2 = 1

x3 = x2 - (s % x2)
y3 = s // x2 + 1

print(0, 0, x2, y2, x3, y3)

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

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

    y = s//10**9
    x = s%10**9
    if x == 0:
        result = [0,0,10**9,1,x,y]
    else:
        result = [0,0,10**9,1,10**9-x,y+1]
    print(*result)
if __name__ == '__main__':
    main()

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

y = s//10**9
x = s%10**9
if x == 0:
    result = [0,0,10**9,1,x,y]
else:
    result = [0,0,10**9,1,10**9-x,y+1]
print(*result)

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

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

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

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

Solution (Python):
def main():
    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)


if __name__ == "__main__":
    main()

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


d=s//10**9+1
c=10**9*d-s
if s==10**18:
	c,d=0,10**9
print(0,0,10**9,1,c,d)

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

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

x1,y1 = 0,0

x2 = s//10**9
y3 = 10**9

if x2*10**9<s:
    x2 += 1

x3 = x2*10**9-s
y2 = 1



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

Solution (Python):
from math import sqrt, ceil

s = int(input())
x = ceil(sqrt(s))
print(0, 0, x, 1, x**2 - s, x)

Solution (Python):
import math
S = int(input())
a1, b2 = math.ceil(S**0.5), math.ceil(S**0.5)
c = a1*b2 - S

print("0 0 " + str(a1) + " " + str(c) + " 1 " + str(b2))

Solution (Python):
import math
n=int(input())
x1,y1=0,0
x2,y2=10**9,1
y3 = n//x2 +1
if y3>x2:
    y3=x2
x3 = y3*x2 - n


output=[x1,y1,x2,y2,x3,y3]
output=list(map(str,output))
    
print(" ".join(output))

Solution (Python):
def resolve():
    s = int(input())
    
    x2, y2 = 10 ** 9, 1
    y3 = -(-s // 10 ** 9)
    x3 = y3 * 10 ** 9 - s
    print(0, 0, x2, y2, x3, y3)


if __name__ == "__main__":
    resolve()

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

y,x = divmod(-s,10**9)

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

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

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

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

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

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

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

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

if(S <= 10**9):
 X1,Y1 = 0,0
 X2,Y2 = 1,0
 X3,Y3 = 0,S
elif(S != 10**18):  
 X1,Y1 = 0,0
 X2,Y2 = 10**9,1
 a,b = S//(10**9),S%(10**9)
 X3,Y3 = (10**9)-b,a+1
else:
 X1,Y1 = 0,0
 X2,Y2 = 10**9,0
 X3,Y3 = 0,10**9

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

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

Solution (Python):



def main():
    from math import ceil

    s = int(input())

    
    
    
    
    
    
    
    
    y3 = ceil(s / 10 ** 9)
    y2 = ((10 ** 9) * y3) - s
    print(0, 0, 10 ** 9, y2, 1, y3)


if __name__ == '__main__':
    main()

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

if S == 1000000000000000000:
    print(0, 0, 0, 1000000000, 1000000000, 0)
    sys.exit()

x2 = 10 ** 9
y2 = 1

x3 = S % x2
y3 = S // (x2)

x3 = x2 - x3
y3 += 1
print(0, 0, x2, y2, x3, y3)

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

n = 10 ** 9
Y = (n - (S % n)) % n
X = (S + Y) // n

print("0 0 1 {} {} {}".format(n, X, Y))

Solution (Python):
S = int(input())
x1 = min(10**9, int(S**0.5) + 1)
y2 = min(10**9, int(S**0.5) + 1)
r = x1 * y2 - S
x2 = r
y1 = 1
print(0, 0, x1, y1, x2, y2)

Solution (Python):
S = int(input())
y1 = 1
if S >= 10 ** 9:
	x1 = 10 ** 9
	if S % x1 == 0:
		y2 = S // x1
	else:
		y2 = (S // x1) + 1 
else:
	x1 = 10 ** 9
	y2 = 1

x2 = x1 * y2 - S 

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

Solution (Python):
import math

S=int(input())

if S==0:
    ans=[0,0,0,0,0,0]
elif S==10**18:
    ans=[0,0,10**9,0,10**9,10**9]
elif S%(10**9)==0:
    ans=[0,0,10**9,0,0]
    ans.append(S//(10**9))
else:
    ans=[0,0,10**9,1]
    ans.append(10**9-S%(10**9))
    ans.append(math.ceil(S/(10**9)))
print(*ans)

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

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

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

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

print(*answer)

Solution (Python):
import math

s = int(input())
a = math.ceil(math.sqrt(s))
b = math.ceil(s / a)
r = a * b - s
if a < b:
    a, b = b, a
print(0, 0, a, 1, r, b)

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

MAX = int(1e9)
def main():
    S = int(input())
    x2 = int(1e9)
    if S%x2 != 0:
        y3 = (S // x2) + 1
        x3 = x2 - (S % x2)
    else:
        y3 = S // x2
        x3 = 0
    print(0, 0, x2, 1, x3, y3)

if __name__ == "__main__":
    main()

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

Solution (Python):
import numpy as np

s=int(input())

rt_s=np.ceil(np.sqrt(s))

a=int(rt_s)
if a*a<s:
    a+=1
if a*(rt_s-1)>=s:
    d=int(a-1)
else:
    d=int(a)

b=1
c=int(a*d-s)

if c<10**9:
    print(0, 0, a, b, c, d)

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

Solution (Python):


s = int(input())

q, r = divmod(s, 10 ** 9)
if r != 0:
    x = 10 ** 9 - r
    y = q + 1
else:
    x = r
    y = q

xy = [0, 0, 10 ** 9, 1, x, y]
print(*xy)

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

Solution (Python):
S = int(input())
x1 = 10**9
y1 = 1
y2, x2 = divmod(S, x1)
if x2 != 0:
    x2 = x1 - x2
    y2 +=1
print(x1, y1, x2, y2, 0, 0)

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

X = 0
Y = 0

MAX = 10**9

x1, y1, x2, y2, x3, y3 = (0, 0, MAX, 1, 0, 0)




x3 = (MAX - S) % MAX
y3 = (S - 1) // MAX + 1

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

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

X = 0
Y = 0

MAX = 10**9

x1, y1, x2, y2, x3, y3 = (0, 0, MAX, 1, 0, 0)




x3 = (MAX - S) % MAX
y3 = (S + x3) // MAX

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

Solution (Python):
S=int(input())
X1=0
Y1=0
if S==10**18:
  print(' '.join(['0', '0', '0', '1000000000', '1000000000', '0']))
else:
  X2=10**9
  Y2=1
  Y3=S//(10**9)+1
  X3=Y3*(10**9)-S
  print(' '.join(map(str, [X1, Y1, X2, Y2, X3, Y3])))

Solution (Python):
import math

S = int(input())

x1 = math.ceil(S ** 0.5)
y2 = x1
y1 = x1 * y2 - S
x2 = 1
x3 = 0
y3 = 0
print(x1,y1,x2,y2,x3,y3)

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

r = math.ceil(S**0.5)
d = r**2-S

print(r, d, 1, r, 0, 0)

Solution (Python):
s = int(input())
v = 10 ** 9
x1 = 0
y1 = 0
x2 = v
y2 = 1
x3 = (v - s % v) % v
y3 = (s + x3) // v
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,v,1,x,y)

Solution (Python):
from collections import Counter,defaultdict
import sys,heapq,bisect,math,itertools,string,queue
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

s = inp()
y3 = math.ceil(s/(10**9))
x3 = 10**9*y3 - s
print(0,0,10**9,1,x3,y3)

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

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

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

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

x2 = 1
y2 = 10**9

quotient = S//(10**9)
mod = S%(10**9)

if mod != 0:
    x3 = quotient+1
    y3 = -(mod-10**9)
else:
    x3 = quotient
    y3 = mod
    
print(" ".join(map(str,[0,0,x2,y2,x3,y3])))

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

Solution (Python):
def ef(x):
  l, r = 1, 1000000000
  while l < r:
    mid = (l + r) // 2
    if mid * mid < x:
      l = mid + 1
    else:
      r = mid
  return l

S = int(input())
x = [0, 0, 0]
y = [0, 0, 0]
x[1] = ef(S)
y[2] = x[1]
if x[1] * (x[1] - 1) >= S:
  x[1] -= 1
c = x[1] * y[2] - S
x[2], y[1] = 1, c
for i in range(3):
  print(x[i], y[i], end='')
  if i == 2:
    print()
  else:
    print(end=' ')

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

a = 10 ** 9
d = -(-S // 10 ** 9)
b = 1
c = a * d - S

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    s = int(input().rstrip('\n'))
    x1 = y1 = x2 = y2 = x3 = y3 = 0
    x2 = 1
    y2 = 10 ** 9
    x3 = (s + y2 - 1) // y2
    y3 = x3 * y2 - s
    print(x1, y1, x2, y2, x3, y3)


if __name__ == '__main__':
    slove()

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

Solution (Python):
s = int(input())
q = s // (10**9)
r = s % (10**9)
if r != 0:
  q += 1
  r = 10**9 - r
print("0 0 1 1000000000 "+str(q)+" "+str(r))

Solution (Python):
def main():
    S = int(input())
    if S == pow(10, 18):
        return 0, 0, pow(10, 9), 0, 0, pow(10, 9)
    x1, y1 = 0, 0
    x2, y2 = pow(10, 9), 1
    y3 = S // pow(10, 9) + 1
    x3 = pow(10, 9) - S % pow(10, 9)
    
    
    return x1, y1, x2, y2, x3, y3


if __name__ == '__main__':
    output = main()
    print(" ".join(map(str, output)))

Solution (Python):

import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


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

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

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


if __name__ == '__main__':
    main()

Solution (Python):

import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


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

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

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


if __name__ == '__main__':
    main()

Solution (Python):


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

Solution (Python):

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


if __name__ == "__main__":
    main()

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

Solution (Python):
n = int(input())
xa = ya = 0
xb = 10 ** 9
yb = 1
yc = (n + 10 ** 9 - 1) // (10 ** 9)
xc = yc * (10 ** 9) - n
print(xa, ya, xb, yb, xc, yc)

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

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

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

tmp = S % (10 ** 9)

if tmp != 0:
  x3 = abs(S % (10 ** 9) - 10 ** 9)
  y3 = S // (10 ** 9) + 1
else:
  x3 = 0
  y3 = S // (10 ** 9)
    
print(*[x1, y1, x2, y2, x3, y3])

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

Q = S // G
R = S % G
if R > 0:
    Q += 1
    R -= G

print(0, 0, G, 1, -R, Q)

Solution (Python):
s = int(input())
a = [0, 0]

a.append(10 ** 9)
a.append(1)

q, r = divmod(s, 10 ** 9)
if r > 0:
    q += 1
    r -= 10 ** 9
    r *= -1

a.append(r)
a.append(q)

print(*a)

Solution (Python):
import numpy as np

s = int(input())
s_root = int(np.ceil(np.sqrt(s)))
upper_s_square = s_root**2
lower_s_square = (s_root-1)**2

solution = [0]*6

if upper_s_square == s:
    solution[2] = s_root
    solution[5] = s_root
elif s_root * (s_root - 1) < s:
    solution[2] = s_root
    solution[3] = upper_s_square - s
    solution[4] = 1
    solution[5] = s_root
else:
    solution[2] = s_root
    solution[3] = s_root*(s_root-1) - s
    solution[4] = 1
    solution[5] = s_root-1
    
print(*solution)

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

print("0 0 {} {} {} {}".format(y, x, n, 1))

Solution (Python):
s = int(input())
n = 10 ** 9

x = 0--s//n
y = - s % n

print("0 0 {} {} {} {}".format(y, x, n, 1))

Solution (Python):
def p_a():
    S = int(input())
    max_v = 10 ** 9

    if S > max_v:
        x2 = (S + max_v - 1) // max_v
        x3 = max_v * x2 - S
        print("0 0 " + str(x2) + " 1 " + str(x3) + " " + str(max_v))
    else:
        print("0 0 1 0 0 " + str(S))


if __name__ == '__main__':
    p_a()

Solution (Python):
import sys
from decimal import *

def main():

	smx=10**18
	mx=10**9

	input = sys.stdin.readline
	s = int(input())

	x1=int(Decimal(s).sqrt())
	y1=0;x2=0;y2=0
	if s==x1*x1:
		y1=0;x2=0;y2=x1;
	elif (s%2==0 and x1%2==0):
		y1=2;x2=int((x1*(x1+2)-s)/2);y2=x1+2
	elif (s%2==0 and x1%2==1) or (s%2==1 and x1%2==0):
		x1=x1+1;y1=2;x2=int((x1**2-s)/2);y2=x1
	elif s%2==1 and x1%2==1:
		if x1<mx-1:
			y1=2;x2=int((x1*(x1+2)-s)/2);y2=x1+2
		else:
			a=(x1+1)*(x1+1)-s
			if a<=x1+1:
				x1=x1+1;y1=1;x2=a;y2=x1
			else:
				y1=1;x2=x1*(x1+1)-s;y2=x1+1
	print(0,0,x1,y1,x2,y2)
main()

Solution (Python):
S = int(input())
if S <= 1000000000:
    X2 = 1
    Y3 = S
    print(0,0,X2,0,0,Y3)
elif S == 10 ** 18:
    print(0,0,0,1000000000,1000000000,0)
else:
    X2 = 1000000000
    S_mod = S % X2
    X3 = X2 - S_mod
    Skiriage = S + X3
    Y3 = Skiriage / X2
    print(0,0,X2,1,X3,int(Y3))

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

Solution (Python):
s=int(input())
x1,y1=0,0

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

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip() 

dup = lambda x,y: ((x)+(y)-1)//(y)

def solve():
  s = ni()
  v = 10**9
  
  y = dup(s, v)
  x = y*v-s
  
  print(0, 0, v, 1, x, y)


solve()

Solution (Python):

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

if S == 10**18:
    print(0, 0, INF, 1, 0, INF)
else:
    x = INF - S % INF
    y = S // INF + 1
    print(0, 0, INF, 1, x, y)

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

e = 10**9
if s == e**2:
    print(0, 0, e, 1, 0, e)
else:
    y = s//e + 1
    x = y*e - s
    print(0, 0, e, 1, x, y)

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

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

Solution (Python):
s = int(input())
inf = 10**9

if s==10**18:
  print(0,0,inf,1,0,inf)
  exit()

x = inf - s%inf
y = s // inf + 1

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

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

if S<=10**9:
 print(0,0,1,0,0,S)
elif S==10**18:
 print(0,0,10**9,0,0,10**9)
else:
 for x2 in reversed(range(1,10**9+1)):
   if int(S/x2)+1 <=10**9:
      print(0,0,x2,1,x2-S%x2,int(S/x2)+1)
      break

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

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

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

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

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

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

x1 = 1000000000
if S % x1 == 0:
    y2 = S // x1
else:
    y2 = S // x1 + 1
    
x2 = 1
y1 = x1 * y2 - S
print(" ".join(map(str, [0, 0, x1, y1, x2, y2])))

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

s = int(input())
import math
y3 = math.ceil(s/(10**9))
x3 = abs((10**9)*y3-s)

print("0 0 %d %d %d %d" %(10**9, 1, x3, y3))

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

A = 10**9

v = (s + A - 1)//A
w = A*v - s
print(0, 0, A, w, 1, v)

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

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

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

X1 = 0
Y1 = 0

X2 = 1
Y2 = 10**9

a = str(S)
if len(a) <= 9:
    X3 = 1
    Y3 = 10**9-S
else:
    X3 = int(a[0:(len(a)-9)])+1
    Y3 = X3*10**9-S
if S == 10**18:
    X3 = 10**9
    Y3 = 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

x1 = 10 ** 9
y1 = 1
if s % x1 == 0:
    y2 = s // x1
else:
    y2 = s // x1 + 1
x2 = x1 * y2 - s

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

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

import math
b = int(math.sqrt(a))

if a == b ** 2:
    x = [0, 0, b, 0, 0, b]
elif a == b * (b + 1):
    x = [0, 0, b, 0, 0, b + 1]
elif a > b * (b + 1):
    x = [0, 0, (b + 1) ** 2 - a, b + 1, b + 1, 1]
elif a < b * (b + 1):
    x = [0, 0, 1, b + 1, b, b * (b + 1) - a]

x_string = map(str, x)
print(' '.join(x_string))

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

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

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

Solution (Python):
import math

S = int(input())

x = math.ceil(S/1000000000)
y = 1000000000*x - S

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

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

x,y = 1,S
ret = int(math.sqrt(S))
if(ret**2 == S):
    print("{} {} {} {} {} {}".format(0,0,0,ret,ret,ret))
else:
    print("{} {} {} {} {} {}".format(0,0,ret+1,(ret+1)**2-S,1,ret+1))

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

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

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