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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

import javax.sound.sampled.ReverbType;

public class Solution {
	private BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	private BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
	private StringTokenizer st;
	private Long MOD = 1000000007L;

	public static void main(String[] args) throws Exception {
		new Solution().solve();
	}

	private void solve() throws Exception {

		int testCases = 1;
//		testCases = Integer.parseInt(in.readLine().trim());
		for (int i = 1; i <= testCases; i++) {
			solve(i);
		}

		out.flush();
		out.close();
	}

	private void solve(int testCaseNumber) throws Exception {
		int n = ri();
		
		
		
		
		
		long arr[] = rla(n);
		
		if(n == 1) {
			
			out.write("1 1\n");
			out.write(-arr[0] + "\n");
			out.write("1 1\n");
			out.write(0 + "\n");
			out.write("1 1\n");
			out.write(0 + "\n");
			return;
		}
		
		if(n == 2) {
			
			out.write("1 1\n");
			out.write(-arr[0] + "\n");
			out.write("2 2\n");
			out.write(-arr[1] + "\n");
			out.write("1 1\n");
			out.write(0 + "\n");
			return;
		}
		
		
		if(n == 3) {
			out.write("1 1\n");
			out.write(-arr[0] + "\n");
			out.write("2 2\n");
			out.write(-arr[1] + "\n");
			out.write("3 3\n");
			out.write(-arr[2] + "\n");
			
			return;
		}
		
		if( n % 2 == 0) {
			long odd = n - 1;
			long mI = modInverse(odd, n);
//			System.out.println(mI);
			out.write(1 + " " + odd + "\n");
			for(int i = 0; i < odd; i++) {
				long x = arr[i];
				
				long ans =  - x * mI;
				ans %= n;
				ans = (ans * odd ) ;
				arr[i] += ans ;
				
				out.write(ans + " ");
				
			}
			out.write("\n");
			out.write(2 + " " + n + "\n");
			
			for(int i = 1; i < n; i++) {
				long x = arr[i];
				
				long ans =  - x * mI;
				ans %= n;
				ans = (ans * odd ) ;
				arr[i] += ans ;
				
				out.write(ans + " ");
			}
			out.write("\n");
//			System.out.println(Arrays.toString(arr));
			
			out.write(1 + " " + n + "\n");
			
			for(long x: arr) out.write(-x + " ");
			out.write("\n");
		} else {
			long odd = n - 2;
			long mI = modInverse(odd, n);
			
			out.write(1 + " " + odd + "\n");
			for(int i = 0; i < odd; i++) {
				long x = arr[i];
				
				long ans =  - x * mI;
				ans %= n;
				ans = (ans * odd ) ;
				arr[i] += ans ;
				
				out.write(ans + " ");
				
			}
			out.write("\n");
			
			
			out.write(3 + " " + n + "\n");
			
			for(int i = 2; i < n; i++) {
				long x = arr[i];
				
				long ans =  - x * mI;
				ans %= n;
				ans = (ans * odd ) ;
				arr[i] += ans ;
				
				out.write(ans + " ");
			}
			out.write("\n");
			
			out.write(1 + " " + n + "\n");
			
			for(long x: arr) out.write(-x + " ");
			out.write("\n");
			
		}
		
	}
	
	long modInverse(long a, long m) 
    { 
        a = a % m; 
        for (long x = 1; x < m; x++) 
           if ((a * x) % m == 1) 
              return x; 
        return 1; 
    } 
	
	
	// utilities below
	
	// IO UTILS
	String line() throws IOException{
		return in.readLine();
	}
	
	String l() throws IOException {
		return in.readLine();
	}
	
	StringTokenizer tokens() throws IOException{
		return new StringTokenizer(line());
	}
	
	
	long l(String s) {
		return Long.parseLong(s);
	}
	long rl() throws IOException{
		return l(line());
	}
	long[] rla(int n) throws IOException {
		long[] arr = new long[n];
		st = tokens();
		
		for(int i = 0; i < n; i++) arr[i] = l(st.nextToken());
		
		return arr;
	}
	
	
	int i(String s) {
		return Integer.parseInt(s);
	}
	int ri() throws IOException {
		return i(line());
	}
	int[] ria(int n) throws IOException {
		int[] arr = new int[n];
		st = tokens();
		
		for(int i = 0; i < n; i++) arr[i] = i(st.nextToken());
		
		return arr;
	}
	
	
	String rs() throws IOException {
		return line();
	}
	String[] rsa(int n) throws IOException {
		String s[] = new String[n];
		
		st = tokens();
		
		for(int i = 0; i < n; i++) s[i] = st.nextToken();
		
		return s;
	}
	// IO UTILS END

	
	// MATH UTILS
	
	long gcd(long a, long b) { return b == 0 ? a : gcd(b, a % b); }
	// MATH UTILS END
}