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: sosu = [2]
  now = 3
  
  while now**2 <= 10**9:
  
      for i in sosu:
  
          flag = True
          if now % i == 0:
              flag = False
              break
  
      if flag:
          sosu.append(now)
  
      now += 1
  
  # print (sosu)
  
  sosu.insert(0, 1)
  
  
  S = int(input())
  
  lis = []
  
  
  r = int(S**0.5)
  
  st1 = r
  st2 = r
  mode = 0
  
  while True:
  
      if st1 * st2 - S >= 0:
  
          cd = (st1 * st2) - S
  
          for i in sosu:
  
              flag = False
  
              if cd % i == 0 and cd // i <= 10**9 and st1 <= 10**9 and st2 <= 10**9:
  
                  print(0, 0, st1, cd // i, i, st2)
                  flag = True
                  break
  
      if flag:
          break
  
      if st2 == 10**9 and st1 == 10**9:
          mode = 1
          st1 = 10**9
          st2 = r
  
      if mode == 1 and st1 * st2 < S:
          st1 -= 1
          st2 = r
  
      elif mode == 1:
          st2 -= 1
  
      elif st1 >= 10**9:
          st2 += 1
          st1 = r
  
      else:
          st1 += 1
  
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"}]