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:
// package LeetCode;

import java.util.*;
import java.io.*;

public class Main {

	static class Reader {
		BufferedReader br;
		StringTokenizer st;

		public Reader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		public int nextInt() throws IOException {
			if (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return Integer.parseInt(st.nextToken());
		}

		public float nextFloat() throws IOException {
			if (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return Float.parseFloat(st.nextToken());
		}

		public long nextLong() throws IOException {
			if (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return Long.parseLong(st.nextToken());
		}

		public double nextDouble() throws IOException {
			if (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return Double.parseDouble(st.nextToken());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreTokens()) {
				st = new StringTokenizer(br.readLine());
			}
			return st.nextToken();
		}
	}

	static class Pair<T1 extends Comparable<T1> ,T2 extends Comparable<T2>> implements Comparable<Pair<T1,T2>>{
		T1 first;
		T2 second;

		public Pair(T1 first, T2 second) {
			this.first = first;
			this.second = second;
		}
		
		@Override
		public int compareTo(Pair<T1,T2> o) {
			return this.first.compareTo(o.first);
		}	
	}
	
	public static long[] initArray(int n) throws IOException {
		long arr[] = new long[n];
		for(int i=0;i<n;i++) {
			arr[i] = sc.nextLong();
		}
		return arr;
	}
	
	public static long mul(long a, long b) {
		return (a*b)%mod;
	}
	
	public static long add(long a, long b) {
		return (a+b)%mod;
	}
	
	public static long max(long arr[]) throws IOException {
		long max = Long.MIN_VALUE;
		for(long a : arr) {
			max = Math.max(max, a);
		}
		return max;
	}
	
	public static long min(long arr[]) throws IOException {
		long min = Long.MAX_VALUE;
		for(long a : arr) {
			min = Math.min(min, a);
		}
		return min;
	}
	
	public static long sum(long arr[]) throws IOException {
		long sum = 0;
		for(long a : arr) {
			sum+=a;
		}
		return sum;
	}
	
	public static ArrayList<Integer>[] initAdjacency(int n, int e, boolean undirected) throws IOException{
		ArrayList<Integer>[] list = new ArrayList[n+1];
		for(int i=0;i<=n;i++) {
			list[i] = new ArrayList<>();
		}		
		for(int i=0;i<e;i++) {
			int u = sc.nextInt();
			int v = sc.nextInt();
			list[u].add(v);
			if(undirected)
				list[v].add(u);
		}
		return list;
	}

	private static void solve() throws IOException {
		int n = sc.nextInt();
		long arr[] = initArray(n);
		if(n==1) {
			out.println("1 1");
			out.println(-1*arr[0]);
			out.println("1 1\n0");
			out.println("1 1\n0");
		} else if(n==2){
			out.println("1 1");
			out.println(-1*arr[0]);
			out.println("2 2");
			out.println(-1*arr[1]);
			out.println("1 1\n0");
		} else if(n==3) {
			out.println("1 1");
			out.println(-1*arr[0]);
			out.println("2 2");
			out.println(-1*arr[1]);
			out.println("3 3");
			out.println(-1*arr[2]);
		} else {
			out.println("1 "+(n-1));
			for(int i=0;i<n-1;i++) {
				out.print(arr[i]*(n-1)+" ");
			}
			out.println();
			out.println(n+" "+n);
			out.println(-1*arr[n-1]);
			out.println("1 "+n);
			for(int i=0;i<n;i++) {
				if(i==n-1)
					out.print(0);
				else
					out.print(-arr[i]*n+" ");
			}
			out.println();
		}
	}
	
	private static void readt() throws IOException {
		T = sc.nextInt();
	}

	static int mod = (int) (1e9 + 7);
	static int T;
	static Reader sc;
	static PrintWriter out;
	public static void main(String[] args) throws IOException {
		sc = new Reader();
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
		try {
			T = 1;
//			readt();
			while (T-- > 0) {
				solve();
			}
			out.flush();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}