Problem: You are given an array a of n integers.

You want to make all elements of a equal to zero by doing the following operation exactly three times:

  * Select a segment, for each number in this segment we can add a multiple of len to it, where len is the length of this segment (added integers can be different). 



It can be proven that it is always possible to make all elements of a equal to zero.

Input

The first line contains one integer n (1 ≤ n ≤ 100 000): the number of elements of the array.

The second line contains n elements of an array a separated by spaces: a_1, a_2, ..., a_n (-10^9 ≤ a_i ≤ 10^9).

Output

The output should contain six lines representing three operations.

For each operation, print two lines:

  * The first line contains two integers l, r (1 ≤ l ≤ r ≤ n): the bounds of the selected segment.

  * The second line contains r-l+1 integers b_l, b_{l+1}, ..., b_r (-10^{18} ≤ b_i ≤ 10^{18}): the numbers to add to a_l, a_{l+1}, …, a_r, respectively; b_i should be divisible by r - l + 1.

Example

Input


4
1 3 2 4


Output


1 1 
-1
3 4
4 2
2 4
-3 -6 -6

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
 
 
public class solve{

	public static Reader sc = new Reader();
	//public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	static long mod(long a, long b) {
		if (a < 0) {
			a %= b;
			a += b;
		}
		a %= b;
		return a;
	}
   public static void main(String[] args) throws IOException{
	//BufferedReader br = new BufferedReader(new FileReader("input.in"));

	int n = sc.nextInt();
	long[] a = new long[n];
	for (int i = 0; i  <n; i++) {
		a[i] = sc.nextLong();
	}
	// Idea: Make First n-1 numbers disivible by N.
	if (n == 1) {
		out.println("1 1");
		out.println(-a[0]);
		out.println("1 1");
		out.println(0);
		out.println("1 1");
		out.println(0);
		out.close();
		System.exit(0);
	}
	if (n == 2) {
		out.println("1 1");
		out.println(-a[0]);
		out.println("2 2");
		out.println(-a[1]);
		out.println("1 1");
		out.println(0);
		out.close();
		System.exit(0);
	}
	if (n == 3) {
		out.println("1 1");
		out.println(-a[0]);
		out.println("2 2");
		out.println(-a[1]);
		out.println("3 3");
		out.println(-a[2]);
		out.close();
		System.exit(0);
	}
	long phi = n;
	long temp = n;
	for (long i = 2; i * i <= temp; i++) {
		if (temp % i == 0) {
			while (temp % i == 0) temp/=i;
			phi -= phi/i;
		}
	}
	if (temp > 1) {
		phi -= phi/temp;
	}
	
	//System.out.println(phi);
	//System.out.println("Modular inverse: " + (n-1) * powMod(n-1, phi-1, n));
	out.println(1 + " " + (n-1));
	for (int i = 0; i < n-1; i++) {
		// Solve x * (n-1)+ c = 0 % n.
		long tt = mod(-a[i], n);
		long x = tt * powMod(n-1, phi-1, n);
		long sol = n-1;
		sol *= x;
		
		//out.print("|| ModInv: " + modInv(n-1,phi-1,n) + " ,");
		out.print(sol + " ");
		a[i] += sol;
	}
	out.println();
	//parr(a);
	out.println(n + " " + n);
	out.println(-a[n-1]);
	out.println(1 + " " + n);
	a[n-1] = 0;
	for (int i = 0; i < n; i++) {
		out.print(-a[i] + " ");
		a[i] -= a[i];
	}
	out.println();
	
	out.close();
   }
   static long ceil(long a, long b) {
		return (a+b-1)/b;
	}
   static void parr(long[] a) {
	   out.println("Shitty");
	   for (long x: a) {
		   out.print(x + " ");
	   }
	   out.println();
   }
  
   static long powMod(long base, long exp, long mod) {
	   if (base == 0 || base == 1) return base;
	   if (exp == 0) return 1;
	   if (exp == 1) {
		  // out.println("Yas");
		   return base % mod;
	   }
	   long R = powMod(base, exp/2, mod) % mod;
	   R *= R;
	   R %= mod;
	   if ((exp & 1) == 1) {
		   return base * R % mod;
	   }
	   else return R % mod;
   }
   
   static long pow(long base, long exp) {
	   if (base == 0 || base == 1) return base;
	   if (exp == 0) return 1;
	   if (exp == 1) return base;
	   long R = pow(base, exp/2);
	   if ((exp & 1) == 1) {
		   return R * R * base;
	   }
	   else return R * R;
   }
   

 
   static class Reader 
   { 
       final private int BUFFER_SIZE = 1 << 16; 
       private DataInputStream din; 
       private byte[] buffer; 
       private int bufferPointer, bytesRead; 

       public Reader() 
       { 
           din = new DataInputStream(System.in); 
           buffer = new byte[BUFFER_SIZE]; 
           bufferPointer = bytesRead = 0; 
       } 

       public Reader(String file_name) throws IOException 
       { 
           din = new DataInputStream(new FileInputStream(file_name)); 
           buffer = new byte[BUFFER_SIZE]; 
           bufferPointer = bytesRead = 0; 
       } 

       public String readLine() throws IOException 
       { 
           byte[] buf = new byte[64]; // line length 
           int cnt = 0, c;
           while ((c = read()) != -1) 
           { 
               if (c == '\n') 
               {
            	   break;
               }
               buf[cnt++] = (byte) c; 
           } 
           return new String(buf, 0, Integer.max(cnt-1, 0)); 
       } 

       public int nextInt() throws IOException 
       { 
           int ret = 0; 
           byte c = read(); 
           while (c <= ' ') 
               c = read(); 
           boolean neg = (c == '-'); 
           if (neg) 
               c = read(); 
           do
           { 
               ret = ret * 10 + c - '0'; 
           }  while ((c = read()) >= '0' && c <= '9'); 

           if (neg) 
               return -ret; 
           return ret; 
       } 

       public long nextLong() throws IOException 
       { 
           long ret = 0; 
           byte c = read(); 
           while (c <= ' ') 
               c = read(); 
           boolean neg = (c == '-'); 
           if (neg) 
               c = read(); 
           do { 
               ret = ret * 10 + c - '0'; 
           } 
           while ((c = read()) >= '0' && c <= '9'); 
           if (neg) 
               return -ret; 
           return ret; 
       } 

       public double nextDouble() throws IOException 
       { 
           double ret = 0, div = 1; 
           byte c = read(); 
           while (c <= ' ') 
               c = read(); 
           boolean neg = (c == '-'); 
           if (neg) 
               c = read(); 

           do { 
               ret = ret * 10 + c - '0'; 
           } 
           while ((c = read()) >= '0' && c <= '9'); 

           if (c == '.') 
           { 
               while ((c = read()) >= '0' && c <= '9') 
               { 
                   ret += (c - '0') / (div *= 10); 
               } 
           } 

           if (neg) 
               return -ret; 
           return ret; 
       } 

       private void fillBuffer() throws IOException 
       { 
           bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); 
           if (bytesRead == -1) 
               buffer[0] = -1; 
       } 

       private byte read() throws IOException 
       { 
           if (bufferPointer == bytesRead) 
               fillBuffer(); 
           return buffer[bufferPointer++]; 
       } 

       public void close() throws IOException 
       { 
           if (din == null) 
               return; 
           din.close(); 
       } 
   }

	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
}