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.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
 
	static PrintWriter pw = new PrintWriter(System.out);
 
	public static void main(String[] args) throws IOException, InterruptedException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] arr = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = sc.nextInt();
		}
		long[] ans = arr.clone();
//		Arrays.sort(arr);
		if (n == 1) {
			pw.println(1 + " " + 1);
			arr[0]++;
			pw.println(1);
			pw.println(1 + " " + 1);
			arr[0]++;
			pw.println(1);
			pw.println(1 + " " + 1);
			pw.println(-1 * arr[0]);
		} else {
			pw.println("1 1");
			pw.println(-1 * arr[0]);
			ans[0] = 0;
			pw.println(2 + " " + n);
			for (int i = 1; i < arr.length; i++) {
				long c = (ans[i] % n) * (n - 1);
//				while (ans[i] % n != 0) {
//					ans[i] += n - 1;
//					c+=n-1;
//				}
//				long a=((-arr[i])%n)*(modinverse(n-1,n)%n);
//				while (a<0) {
//					a+=n;
//				}
//				long c=a%n;
				pw.print(c + " ");
				ans[i] += c;
			}
			pw.println();
			pw.println(1 + " " + n);
			for (int i = 0; i < ans.length; i++) {
				pw.print(-1 * ans[i] + " ");
			}
//			pw.println(Arrays.toString(ans));
		}
		pw.close();
	}
 
	static long pow(long a, long e, long mod) {
		a %= mod;
		long res = 1;
		while (e > 0) {
			if ((e & 1) == 1)
				res = (res * a) % mod;
			a = (a * a) % mod;
			e >>= 1;
		}
		return res;
	}
 
	public static long modinverse(long a, long mod) {
		return pow(a, mod - 2, mod);
	}
 
	public static class SegmentTree { // 1-based DS, OOP
 
		int N; // the number of elements in the array as a power of 2 (i.e. after padding)
		long[] array, sTree, lazy;
 
		SegmentTree(long[] in) {
			array = in;
			N = in.length - 1;
			sTree = new long[N << 1]; // no. of nodes = 2*N - 1, we add one to cross out index zero
//			lazy = new long[N << 1];
			Arrays.fill(sTree, (int) 1e9);
//			build(1, 1, N);
		}
 
		void build(int node, int b, int e) // O(n)
		{
			if (b == e)
				sTree[node] = array[b];
			else {
				int mid = b + e >> 1;
				build(node << 1, b, mid);
				build(node << 1 | 1, mid + 1, e);
				sTree[node] = Math.min(sTree[node << 1], sTree[node << 1 | 1]);
			}
		}
 
		void update_point(int index, int val) // O(log n)
		{
			index += N - 1;
			sTree[index] = val;
			while (index > 1) {
				index >>= 1;
				sTree[index] = Math.min(sTree[index << 1], sTree[index << 1 | 1]);
			}
		}
 
		void update_range(int i, int j, int val) // O(log n)
		{
			update_range(1, 1, N, i, j, val);
		}
 
		void update_range(int node, int b, int e, int i, int j, int val) {
			if (i > e || j < b)
				return;
			if (b >= i && e <= j) {
				sTree[node] += (e - b + 1) * val;
				lazy[node] += val;
			} else {
				int mid = b + e >> 1;
				propagate(node, b, mid, e);
				update_range(node << 1, b, mid, i, j, val);
				update_range(node << 1 | 1, mid + 1, e, i, j, val);
				sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
			}
 
		}
 
		void propagate(int node, int b, int mid, int e) {
			lazy[node << 1] = lazy[node];
			lazy[node << 1 | 1] = lazy[node];
			sTree[node << 1] = lazy[node];
			sTree[node << 1 | 1] = lazy[node];
			lazy[node] = 0;
		}
 
		long query(int i, int j, int v) {
			return query(1, 1, N, i, j, v);
		}
 
		long query(int node, int b, int e, int i, int j, int v) // O(log n)
		{
			if (i > e || j < b || sTree[node] > v)
				return 0;
			if (e - b == 0) {
				if (sTree[node] <= v) {
//					pw.print(sTree[node]+" ");
					sTree[node] = (int) 1e9;
					return 1;
				}
				return 0;
			}
			int mid = b + e >> 1;
//			propagate(node, b, mid, e);
			long q1 = query(node << 1, b, mid, i, j, v);
			long q2 = query(node << 1 | 1, mid + 1, e, i, j, v);
			return q1 + q2;
 
		}
 
	}
 
	public static class pair implements Comparable<pair> {
		long x;
		long y;
 
		public pair(long x, long y) {
			this.x = x;
			this.y = y;
		}
 
		public String toString() {
			return x + " " + y;
		}
 
		public boolean equals(Object o) {
			if (o instanceof pair) {
				pair p = (pair) o;
				return p.x == x && p.y == y;
			}
			return false;
		}
 
		public int hashCode() {
			return new Double(x).hashCode() * 31 + new Double(y).hashCode();
		}
 
		public int compareTo(pair other) {
			if (this.x == other.x) {
				return Long.compare(this.y, other.y);
			}
			return Long.compare(this.x, other.x);
		}
	}
 
	public static class tuble implements Comparable<tuble> {
		int x;
		int y;
		int z;
 
		public tuble(int x, int y, int z) {
			this.x = x;
			this.y = y;
			this.z = z;
		}
 
		public String toString() {
			return x + " " + y + " " + z;
		}
 
		public int compareTo(tuble other) {
			if (this.x == other.x) {
				if (this.y == other.y)
					return this.z - other.z;
				return this.y - other.y;
			} else {
				return this.x - other.x;
			}
		}
	}
 
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;
 
		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}
 
		public boolean hasNext() {
			// TODO Auto-generated method stub
			return false;
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
	}
}