s = int(input())

x2 = 10**9
y2 = 1
x3 = s % (10**9) 
y3 = s // (10**9) 
if x3 > 0:
  x3 = 10**9 - s % (10**9) 
  y3 = s // (10**9) + 1
print("0 0 " + str(10**9) + " 1 " + str(x3) + " " + str(y3))
16705274458fce6c78ca1fac6959437d5ae619af
<mask token>

<mask token>
if x3 > 0:
    x3 = 10 ** 9 - s % 10 ** 9
    y3 = s // 10 ** 9 + 1
print('0 0 ' + str(10 ** 9) + ' 1 ' + str(x3) + ' ' + str(y3))

s = int(input())
x2 = 10 ** 9
y2 = 1
x3 = s % 10 ** 9
y3 = s // 10 ** 9
if x3 > 0:
    x3 = 10 ** 9 - s % 10 ** 9
    y3 = s // 10 ** 9 + 1
print('0 0 ' + str(10 ** 9) + ' 1 ' + str(x3) + ' ' + str(y3))

s = int(input())

x2 = 10**9
y2 = 1
x3 = s % (10**9) 
y3 = s // (10**9) 
if x3 > 0:
  x3 = 10**9 - s % (10**9) 
  y3 = s // (10**9) + 1
print("0 0 " + str(10**9) + " 1 " + str(x3) + " " + str(y3))