output_description: 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.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: import sys
  
  input_methods = ["clipboard", "file", "key"]
  using_method = 0
  input_method = input_methods[using_method]
  
  tin = lambda: map(int, input().split())
  lin = lambda: list(tin())
  mod = 1000000007
  
  # +++++
  
  
  def cc(s):
      if s <= 10**9:
          r = [0, 0, s, 0, 0, 1]
          return r
  
      ok = 10**9
      ng = 1
      while ok - ng > 1:
          mid = (ok + ng) // 2
          if mid * mid >= s:
              ok = mid
          else:
              ng = mid
      if ok * ok == s:
          r = [0, 0, ok, 0, 0, ok]
          return r
  
      mx = ok
      ok = mx
      ng = 1
      while ok - ng > 1:
          mid = (ok + ng) // 2
          if mx * mid >= s:
              ok = mid
          else:
              ng = mid
  
      if mx * ok == s:
          return [0, 0, mx, 0, 0, ok]
  
      else:
          diff = s - ((mx - 1) * ok)
          # dd=s-(mx*ok)
          # pa(dd)
          return [0, 0, mx, 1, diff, ok]
  
  
  def main():
      s = int(input())
      # b , c = tin()
      # s = input()
      ret = cc(s)
      print(*ret)
  
  
  # +++++
  isTest = False
  
  
  def pa(v):
      if isTest:
          print(v)
  
  
  def input_clipboard():
      import clipboard
  
      input_text = clipboard.get()
      input_l = input_text.splitlines()
      for l in input_l:
          yield l
  
  
  if __name__ == "__main__":
      if sys.platform == "ios":
          if input_method == input_methods[0]:
              ic = input_clipboard()
              input = lambda: ic.__next__()
          elif input_method == input_methods[1]:
              sys.stdin = open("inputFile.txt")
          else:
              pass
          isTest = True
      else:
          pass
          # input = sys.stdin.readline
  
      ret = main()
      if ret is not None:
          print(ret)
  
problem_description: 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.
samples: [{"input": "3", "output": "1 0 2 2 0 1\n    \n\nThe area of the triangle in a two-dimensional plane whose vertices are\n(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\nalso be accepted.\n\n* * *"}, {"input": "100", "output": "0 0 10 0 0 10\n    \n\n* * *"}, {"input": "311114770564041497", "output": "314159265 358979323 846264338 327950288 419716939 937510582"}]