#![allow(unused_imports, unused_macros, dead_code)]

macro_rules! min {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| min!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = min!($($ys),*);
        if $x < t { $x } else { t }
    }}
}
macro_rules! max {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| max!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = max!($($ys),*);
        if $x > t { $x } else { t }
    }}
}
macro_rules! ewriteln {
    ($($args:expr),*) => { let _ = writeln!(&mut std::io::stderr(), $($args),*); };
}
macro_rules! trace {
    ($x:expr) => { ewriteln!(">>> {} = {:?}", stringify!($x), $x) };
    ($($xs:expr),*) => { trace!(($($xs),*)) }
}
macro_rules! flush {
    () => {
        std::io::stdout().flush().unwrap();
    };
}
macro_rules! put {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        if let Some(x) = it.next() { print!("{}", x); }
        for x in it { print!(" {}", x); }
        println!("");
    }};
    ($x:expr) => { println!("{}", $x) };
    ($x:expr, $($xs:expr),*) => { print!("{} ", $x); put!($($xs),*) }
}

const M: i64 = 1_000_000_007;

fn main() {
    let mut sc = Scanner::new();
    let n: usize = sc.cin();
    let xs: Vec<i64> = sc.vec(n);

    if n == 1 {
        put!("1 1");
        put!("1");
        put!("1 1");
        put!("1");
        put!("1 1");
        put!(-xs[0] - 2);
    } else {
        put!("1 1");
        let m = n as i64;
        put!(xs[0] * (m - 1));
        put!(2, n);
        let v: Vec<i64> = (1..n).map(|i| xs[i] * (m - 1)).collect();
        put!(..v);
        put!(1, n);
        let v: Vec<i64> = (0..n).map(|i| -xs[i] * m).collect();
        put!(..v);
    }
}

use std::collections::VecDeque;
use std::io::{self, Write};
use std::str::FromStr;

struct Scanner {
    stdin: io::Stdin,
    buffer: VecDeque<String>,
}
impl Scanner {
    fn new() -> Self {
        Scanner {
            stdin: io::stdin(),
            buffer: VecDeque::new(),
        }
    }
    fn cin<T: FromStr>(&mut self) -> T {
        while self.buffer.is_empty() {
            let mut line = String::new();
            let _ = self.stdin.read_line(&mut line);
            for w in line.split_whitespace() {
                self.buffer.push_back(String::from(w));
            }
        }
        self.buffer.pop_front().unwrap().parse::<T>().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> {
        self.cin::<String>().chars().collect()
    }
    fn vec<T: FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.cin()).collect()
    }
}


package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
)

var in *bufio.Reader
var out *bufio.Writer

func printf(x string, a ...interface{}) (n int, err error) {
	return fmt.Fprintf(out, x, a...)
}

func scanf(x string, a ...interface{}) (n int, err error) {
	return fmt.Fscanf(in, x, a...)
}

var err error

func next() (n string) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return ""
		}
	}
}

func nextInt() (n int) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return 0
		}
	}
}

func nextLong() (n int64) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return 0
		}
	}
}

func nextDouble() (n float64) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return 0
		}
	}
}

func Fill(a []int, v int) {
	for i := range a {
		a[i] = v
	}
}

func FillB(a []bool, v bool) {
	for i := range a {
		a[i] = v
	}
}

func Min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func Max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func Abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func Gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return Gcd(b, a%b)
}

const mod = 1000000007

func Add(a, b int64) int64 {
	return (a + b) % mod
}

func Mult(a, b int64) int64 {
	return (a * b) % mod
}

func Sub(a, b int64) int64 {
	return (a - b + mod) % mod
}

func solve() {
	n := nextInt()
	if n == 1 {
		x := nextInt()
		printf("1 1\n1\n1 1\n1\n1 1\n%d\n", -(x + 2))
		return
	}
	arr := make([]int64, n)
	for i := range arr {
		arr[i] = nextLong()
	}
	printf("%d %d\n", 1, n)
	for i, v := range arr {
		add := v % int64(n-1)
		printf("%d ", -add*int64(n))
		arr[i] -= add * int64(n)
	}
	printf("\n")
	printf("1 1\n%d\n", -arr[0])
	printf("%d %d\n", 2, n)
	for i := 1; i < n; i++ {
		printf("%d ", -arr[i])
	}
	printf("\n")
}

func main() {
	in = bufio.NewReaderSize(os.Stdin, 8192)
	out = bufio.NewWriterSize(os.Stdout, 8192)
	if false {
		name := "foreign"
		file1, err := os.Open(name + ".in")
		if err != nil {
			log.Fatal(err)
		}
		file2, err := os.Create(name + ".out")
		if err != nil {
			log.Fatal(err)
		}
		in = bufio.NewReaderSize(file1, 8192)
		out = bufio.NewWriterSize(file2, 8192)
	}
	defer out.Flush()
	// start := time.Now()

	// for t, i := nextInt(), 1; t > 0; t, i = t-1, i+1 {
	// 	printf("Case #%d:\n", i)
	solve()
	// }

	// printf("%v\n", time.Now().Sub(start))
}


package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
)

var in *bufio.Reader
var out *bufio.Writer

func printf(x string, a ...interface{}) (n int, err error) {
	return fmt.Fprintf(out, x, a...)
}

func scanf(x string, a ...interface{}) (n int, err error) {
	return fmt.Fscanf(in, x, a...)
}

var err error

func next() (n string) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return ""
		}
	}
}

func nextInt() (n int) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return 0
		}
	}
}

func nextLong() (n int64) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return 0
		}
	}
}

func nextDouble() (n float64) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return 0
		}
	}
}

func Fill(a []int, v int) {
	for i := range a {
		a[i] = v
	}
}

func FillB(a []bool, v bool) {
	for i := range a {
		a[i] = v
	}
}

func Min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func Max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func Abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func Gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return Gcd(b, a%b)
}

const mod = 1000000007

func Add(a, b int64) int64 {
	return (a + b) % mod
}

func Mult(a, b int64) int64 {
	return (a * b) % mod
}

func Sub(a, b int64) int64 {
	return (a - b + mod) % mod
}

func solve() {
	n := nextInt()
	if n == 1 {
		x := nextInt()
		printf("1 1\n1\n1 1\n1\n1 1\n%d\n", -(x + 3))
	}
	arr := make([]int64, n)
	for i := range arr {
		arr[i] = nextLong()
	}
	printf("%d %d\n", 1, n)
	for i, v := range arr {
		add := v % int64(n-1)
		printf("%d ", -add*int64(n))
		arr[i] -= add * int64(n)
	}
	printf("\n")
	printf("1 1\n%d\n", -arr[0])
	printf("%d %d\n", 2, n)
	for i := 1; i < n; i++ {
		printf("%d ", -arr[i])
	}
	printf("\n")
}

func main() {
	in = bufio.NewReaderSize(os.Stdin, 8192)
	out = bufio.NewWriterSize(os.Stdout, 8192)
	if false {
		name := "foreign"
		file1, err := os.Open(name + ".in")
		if err != nil {
			log.Fatal(err)
		}
		file2, err := os.Create(name + ".out")
		if err != nil {
			log.Fatal(err)
		}
		in = bufio.NewReaderSize(file1, 8192)
		out = bufio.NewWriterSize(file2, 8192)
	}
	defer out.Flush()
	// start := time.Now()

	// for t, i := nextInt(), 1; t > 0; t, i = t-1, i+1 {
	// 	printf("Case #%d:\n", i)
	solve()
	// }

	// printf("%v\n", time.Now().Sub(start))
}


package main

import (
	"bufio"
	"fmt"
	"log"
	"os"
)

var in *bufio.Reader
var out *bufio.Writer

func printf(x string, a ...interface{}) (n int, err error) {
	return fmt.Fprintf(out, x, a...)
}

func scanf(x string, a ...interface{}) (n int, err error) {
	return fmt.Fscanf(in, x, a...)
}

var err error

func next() (n string) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return ""
		}
	}
}

func nextInt() (n int) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return 0
		}
	}
}

func nextLong() (n int64) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return 0
		}
	}
}

func nextDouble() (n float64) {
	for {
		_, err = scanf("%v", &n)
		if err == nil {
			return n
		}
		if err.Error() == "EOF" {
			return 0
		}
	}
}

func Fill(a []int, v int) {
	for i := range a {
		a[i] = v
	}
}

func FillB(a []bool, v bool) {
	for i := range a {
		a[i] = v
	}
}

func Min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func Max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func Abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func Gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return Gcd(b, a%b)
}

const mod = 1000000007

func Add(a, b int64) int64 {
	return (a + b) % mod
}

func Mult(a, b int64) int64 {
	return (a * b) % mod
}

func Sub(a, b int64) int64 {
	return (a - b + mod) % mod
}

func solve() {
	n := nextInt()
	if n == 1 {
		x := nextInt()
		printf("1 1\n1\n1 1\n1\n1 1\n%d\n", -(x + 3))
		return
	}
	arr := make([]int64, n)
	for i := range arr {
		arr[i] = nextLong()
	}
	printf("%d %d\n", 1, n)
	for i, v := range arr {
		add := v % int64(n-1)
		printf("%d ", -add*int64(n))
		arr[i] -= add * int64(n)
	}
	printf("\n")
	printf("1 1\n%d\n", -arr[0])
	printf("%d %d\n", 2, n)
	for i := 1; i < n; i++ {
		printf("%d ", -arr[i])
	}
	printf("\n")
}

func main() {
	in = bufio.NewReaderSize(os.Stdin, 8192)
	out = bufio.NewWriterSize(os.Stdout, 8192)
	if false {
		name := "foreign"
		file1, err := os.Open(name + ".in")
		if err != nil {
			log.Fatal(err)
		}
		file2, err := os.Create(name + ".out")
		if err != nil {
			log.Fatal(err)
		}
		in = bufio.NewReaderSize(file1, 8192)
		out = bufio.NewWriterSize(file2, 8192)
	}
	defer out.Flush()
	// start := time.Now()

	// for t, i := nextInt(), 1; t > 0; t, i = t-1, i+1 {
	// 	printf("Case #%d:\n", i)
	solve()
	// }

	// printf("%v\n", time.Now().Sub(start))
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	defer writer.Flush()

	var n int
	scanf("%d\n", &n)
	arr := make([]int, n)
	for i := 0; i < n; i++ {
		scanf("%d", &arr[i])
	}

	printf("1 1\n")
	printf("%d\n", -arr[0])

	printf("1 %d\n", n)
	printf("0 ")
	for i := 1; i < n; i++ {
		printf("%v ", -n*arr[i])
	}
	printf("\n")
	printf("2 %d\n", n)
	for i := 1; i < n; i++ {
		printf("%v ", (n-1)*arr[i])
	}
	printf("\n")
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	defer writer.Flush()

	var n int
	scanf("%d\n", &n)
	arr := make([]int, n)
	for i := 0; i < n; i++ {
		scanf("%d", &arr[i])
	}
	if n != 1 {
		printf("1 1\n")
		printf("%d\n", -arr[0])

		printf("1 %d\n", n)
		printf("0 ")
		for i := 1; i < n; i++ {
			printf("%v ", -n*arr[i])
		}
		printf("\n")
		printf("2 %d\n", n)
		for i := 1; i < n; i++ {
			printf("%v ", (n-1)*arr[i])
		}
		printf("\n")
	} else {
		printf("1 1\n0\n1 1\n0\n1 1\n%v\n", -arr[0])
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	defer writer.Flush()

	var n int
	scanf("%d\n", &n)
	arr := make([]int, n)
	for i := 0; i < n; i++ {
		scanf("%d", &arr[i])
	}

	printf("1 1\n")
	printf("%d\n", -arr[0])

	printf("1 %d\n", n)
	printf("0 ")
	for i := 1; i < n; i++ {
		printf("%v ", -2*arr[i])
	}
	printf("\n")
	printf("2 %d\n", n)
	for i := 1; i < n; i++ {
		printf("%v ", arr[i])
	}
	printf("\n")
}


package main

import (
	"bufio"
	"fmt"
	"os"
)

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }

func main() {
	defer writer.Flush()

	var n int
	scanf("%d\n", &n)
	arr := make([]int64, n)
	for i := 0; i < n; i++ {
		scanf("%d", &arr[i])
	}
	if n != 1 {
		printf("1 1\n")
		printf("%d\n", -arr[0])

		printf("1 %d\n", n)
		printf("0 ")
		for i := 1; i < n; i++ {
			printf("%v ", int64(-n)*arr[i])
		}
		printf("\n")
		printf("2 %d\n", n)
		for i := 1; i < n; i++ {
			printf("%v ", int64(n-1)*arr[i])
		}
		printf("\n")
	} else {
		printf("1 1\n0\n1 1\n0\n1 1\n%v\n", -arr[0])
	}
}


package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func CF1396A(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var n int64
	Fscan(in, &n)
	a := make([]int64, n)
	for i := range a {
		Fscan(in, &a[i])
	}
	if n == 1 {
		Fprint(out, "1 1\n", -a[0], "\n1 1\n0\n1 1\n0")
		return
	}
	Fprintln(out, "1 1\n", -a[0])
	a[0] = 0
	Fprintln(out, 2, n)
	for i, v := range a[1:] {
		Fprint(out, v*(n-1), " ")
		a[i+1] += v * (n - 1)
	}
	Fprintln(out)
	Fprintln(out, 1, n)
	for _, v := range a {
		Fprint(out, -v, " ")
	}
}

func main() { CF1396A(os.Stdin, os.Stdout) }


FAST_IO = 0
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()

    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
rrmm = lambda n: [rrm() for _ in xrange(n)]

####
MOD = 10**9 + 7
YES, NO = "Yes", "No"
from collections import defaultdict as ddic

def solve(N, A):
    if N == 1:
        print "1 1"
        print -A[0]
        print "1 1"
        print 1
        print "1 1"
        print -1
        return
    if N == 2:
        print "1 1"
        print -A[0] - 2
        print "2 2"
        print -A[1] - 2
        print "1 2"
        print "2 2"
        return

    Nm = N - 1
    print "1 " + str(N - 1)
    row = []
    for i in xrange(N - 1):
        x = A[i]
        row.append(x * (N - 1))
    print " ".join(map(str, row))

    row = []
    print str(N) + " " + str(N)
    print A[-1] * (N - 1)

    row = []
    print "1 " + str(N)
    for i in xrange(N):
        x = A[i]
        row.append(-x * N)
    print " ".join(map(str, row))

N = rri()
A = rrm()
ans = solve(N, A)


import io
import os

from collections import Counter, defaultdict, deque

def solve(N, A):
    ans = [
        '1 1',
        str(-A[0])
    ]
    A[0] = 0
    if N == 1:
        ans.append('1 1')
        ans.append('0')
        ans.append('1 1')
        ans.append('0')
        return '\n'.join(ans)
    #print(A)
    assert N >= 2

    ans.append('1 ' + str(N))

    line = []
    for i in range(N):
        a = A[i]
        line.append(-a * N)
        A[i] += -a * N
    ans.append(' '.join(map(str, line)))

    #print(A)

    ans.append('2 ' + str(N))
    line = []
    for i in range(1, N):
        a = A[i]
        assert a % (N - 1) == 0
        line.append(-a)
        A[i] -= a
    ans.append(' '.join(map(str, line)))
    #print(A)
    #assert all(x == 0 for x in A)

    return '\n'.join(ans)

DEBUG = False
if DEBUG:
    solve(1, [6])
    import random

    random.seed(0)
    for _ in range(100):
        N = random.randint(1, 10)
        A = [random.randint(1, 10) for i in range(N)]
        print('tc', _, N, A)
        ans1 = solve(N, A)
        print(ans1)
    exit()

if __name__ == "__main__":
    input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

    N, = [int(x) for x in input().split()]
    A = [int(x) for x in input().split()]

    ans = solve(N, A)
    print(ans)


import io
import os

from collections import Counter, defaultdict, deque

def solve(N, A):
    ans = [
        '1 1',
        str(-A[0])
    ]
    A[0] = 0
    if N == 1:
        ans.append('1 1')
        ans.append('0')
        ans.append('1 1')
        ans.append('0')
        return
    assert N >= 2

    ans.append('1 ' + str(N))

    line = []
    for i in range(N):
        a = A[i]
        line.append(-a * N)
        A[i] += -a * N
    ans.append(' '.join(map(str, line)))

    #print(A)

    ans.append('2 ' + str(N))
    line = []
    for i in range(1, N):
        a = A[i]
        assert a % (N - 1) == 0
        line.append(-a)
        A[i] -= a
    ans.append(' '.join(map(str, line)))
    #print(A)

    return '\n'.join(ans)

if __name__ == "__main__":
    input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

    N, = [int(x) for x in input().split()]
    A = [int(x) for x in input().split()]

    ans = solve(N, A)
    print(ans)


from collections import *
from sys import stdin,stderr
def rl():
    return [int(w) for w in stdin.readline().split()]

n, = rl()
a = rl()

print(1, n)
print(*(-x for x in a))
print(1, n)
print("1 " * n)
print(1, n)
print("-1 " * n)


from collections import *
from sys import stdin,stderr
def rl():
    return [int(w) for w in stdin.readline().split()]

n, = rl()
a = rl()

print(1, n)
print(*(-n*x for x in a))
print(1, n-1)
print(*((n-1)*x for x in a[:-1]))
print(n, n)
print((n-1)*a[-1])


from collections import *
from sys import stdin,stderr
def rl():
    return [int(w) for w in stdin.readline().split()]

n, = rl()
a = rl()

if n > 1:
    print(1, n)
    print(*(-n*x for x in a))
    print(1, n-1)
    print(*((n-1)*x for x in a[:-1]))
    print(n, n)
    print((n-1)*a[-1])
else:
    print(1, 1)
    print(-a[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)


import sys
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))
if n == 1:
    print(1, 1)
    print(-a[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    exit()

inv = 0
for i in range(1, n):
    if (n - 1) * i % n == 1:
        inv = i
        break

print(1, 1)
print(-a[0])
a[0] = 0
print(2, n)
op = []
for i in range(1, n):
    x = -a[i] * inv % n* (n - 1)
    op.append(x)
    a[i] += x
print(*op)
print(1, n)
op = [-x for x in a]
print(*op)


import sys
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))
if n == 1:
    print(1, 1)
    print(-a[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    exit()

inv = 0
for i in range(1, n):
    if (n - 1) * i % n == 1:
        inv = i
        break

print(1, 1)
print(-a[0])
a[0] = 0
print(2, n)
op = []
for i in range(1, n):
    x = -a[i] * inv * (n - 1) % n
    op.append(x)
    a[i] += x
print(*op)
print(1, n)
op = [-x for x in a]
print(*op)


import sys
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))
if n == 1:
    print(1, 1)
    print(-a[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    exit()
print(1, 1)
print(-a[0])
a[0] = 0
print(2, n)
op = []
for i in range(1, n):
    x = -a[i] * pow(n - 1, -1, n) * (n - 1) % n
    op.append(x)
    a[i] += x
print(*op)
print(1, n)
op = [-x for x in a]
print(*op)


from sys import exit, stdin, stdout
n = int(input())
a = [int(i) for i in stdin.readline().split()]

if n == 1:
    print(1, 1)
    print(-a[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    exit(0)

print(2, n)
for i in range(1, n):
    print((a[i] % n) * (n - 1), end=' ')
    a[i] += (a[i] % n) * (n - 1)
print()

print(1, n)
print(0, end=' ')
for i in range(1, n):
    print(-a[i], end=' ')
print()

print(1, 1)
print(-a[0])


from sys import exit, stdin, stdout
n = int(input())
a = [int(i) for i in stdin.readline().split()]

if n == 1:
    stdout.write("1 1\n" + str(-a[0]) + "\n1 1\n0\n1 1\n0\n")
    exit(0)

stdout.write("2 " + str(n) + "\n")
stdout.write(" ".join([str((a[i] % n) * (n - 1)) for i in range(1, n)]) + "\n")
for i in range(1, n):
    a[i] += (a[i] % n) * (n - 1)

stdout.write("1 " + str(n) + "\n")
stdout.write(" ".join(["0"] + [str(-a[i]) for i in range(1, n)]) + "\n")
stdout.write("1 1\n" + str(-a[0]) + "\n")


from sys import exit
n = int(input())
a = [int(i) for i in input().split()]

if n == 1:
    print(1, 1)
    print(-a[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    exit(0)

print(2, n)
for i in range(1, n):
    print((a[i] % n) * (n - 1), end=' ')
    a[i] += (a[i] % n) * (n - 1)
print()

print(1, n)
print(0, end=' ')
for i in range(1, n):
    print(-a[i], end=' ')
print()

print(1, 1)
print(-a[0])


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil,pi,sin,cos,acos,atan
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from bisect import insort
from collections import Counter
from collections import deque
from heapq import heappush,heappop,heapify
from itertools import permutations,combinations
mod = int(1e9)+7

ip = lambda : int(stdin.readline())
inp = lambda: map(int,stdin.readline().split())
ips = lambda: stdin.readline().rstrip()
out = lambda x : stdout.write(str(x)+"\n")

t = 1
for _ in range(t):
    n = ip()
    arr = list(inp())
    if n == 1:
        print(1,1)
        print(-arr[0])
        print(1,1)
        print(0)
        print(1,1)
        print(0)
    else:
        print(1,1)
        print(-arr[0])
        print(1,n)
        arr[0] = 0
        sam = [-n*i for i in arr]
        print(*sam)
        print(2,n)
        sam = [(n-1)*i for i in arr]
        print(*sam)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log2, ceil,pi,sin,cos,acos,atan
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from bisect import insort
from collections import Counter
from collections import deque
from heapq import heappush,heappop,heapify
from itertools import permutations,combinations
mod = int(1e9)+7

ip = lambda : int(stdin.readline())
inp = lambda: map(int,stdin.readline().split())
ips = lambda: stdin.readline().rstrip()
out = lambda x : stdout.write(str(x)+"\n")

t = 1
for _ in range(t):
    n = ip()
    arr = list(inp())
    test = list(arr)
    if n == 1:
        print(1,1)
        print(-arr[0])
        print(1,1)
        print(0)
        print(1,1)
        print(0)
    else:
        print(1,1)
        print(-arr[0])
        print(1,n)
        arr[0] = 0
        sam = [-n*i for i in arr]
        print(*sam)
        print(2,n)
        sam = []
        for i in range(1,n):
            sam.append((n-1)*arr[i])
        print(*sam)


mod = 1000000007
eps = 10**-9

def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    A = list(map(int, input().split()))

    if N == 1:
        print(1, 1)
        print(-A[0])
        print(1, 1)
        print(0)
        print(1, 1)
        print(0)
        exit()

    print(1, N-1)
    L = []
    for a in A[:-1]:
        L.append((N-1) * a)
    print(*L)
    print(N, N)
    print((N-1) * A[-1])
    print(1, N)
    L = []
    for a in A:
        L.append((-N) * a)
    print(*L)

if __name__ == '__main__':
    main()


n=int(input())
L=list(map(int,input().split()))
print(1,n-1)
for i in range(n-1):print(L[i]*(n-1),end=' ')
print()
print(n,n)
print(-L[n-1])
print(1,n)
for i in range(n-1):print(-L[i]*n,end=' ')
print(0)


n=int(input())
L=list(map(int,input().split()))
print(1,n-1)
for i in range(n-1):print(L[i],end=' ')
print()
print(n,n)
print(-L[n-1])
print(1,n)
for i in range(n-1):print(-L[i],end=' ')
print(0)


n=int(input())
L=list(map(int,input().split()))
if n==1:
    print(1,1)
    print(0)
    print(1,1)
    print(0)
    print(1,1)
    print(-L[0])
else:
    print(1,n-1)
    for i in range(n-1):print(L[i]*(n-1),end=' ')
    print()
    print(n,n)
    print(-L[n-1])
    print(1,n)
    for i in range(n-1):print(-L[i]*n,end=' ')
    print(0)


n=int(input())
a=list(map(int,input().split()))
print("1 1\n"+str((n-1)*a[0]))
if n>=2:
  print(2,n)
  print(*[(n-1)*a[i] for i in range(1,n)])
else:print("1 1\n0")
print(1,n)
print(*[-n*a[i]for i in range(n)])


import sys
#import math
#from queue import *
#import random
#sys.setrecursionlimit(int(1e6))
input = sys.stdin.readline

############ ---- USER DEFINED INPUT FUNCTIONS ---- ############
def inp():
    return(int(input()))
def inara():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
################################################################
############ ---- THE ACTUAL CODE STARTS BELOW ---- ############

n=inp()
a=inara()

if n==1:
	print(1,1)
	print(-a[0])
	print(1,1)
	print(0)
	print(1,1)
	print(0)
	exit(0)

print(1,1)
print(-a[0])
print(1,n)
for i in range(n):
	if i==0:
		print(0,end=" ")
	else:
		print(-n*a[i],end=" ")
print()
print(2,n)
for i in range(1,n):
	print((n-1)*a[i],end=" ")


import sys

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())

def gcd(a, b):
	if b == 0:
		return 1,0
	x, y = gcd(b, a % b)
	#a%b = a - (a//b)*b
	#b*x + y*(a%b) = d
	#b*x + y*a - y*(a//b)*b = d
	#y*a + (x - y*(a//b))*b  = d
	return y, x - y*(a//b)

def solve():
	n = mint()
	a = list(mints())
	if n == 1:
		print(1,1)
		print(-a[0])
		print(1,1)
		print(0)
		print(1,1)
		print(0)
		return
	x, y = gcd(n, n-1)
	print(1, n)
	print(' '.join([str(-i*x*n) for i in a]))
	print(1, n-1)
	print(' '.join([str(-i*y*(n-1)) for i in a[:n-1]]))
	print(n, n)
	print(str(a[n-1]*(x*n-1)))

'''def check(a,b):
	x,y = gcd(a,b)
	print(a, b, x, y, x*a+y*b)

check(6,12)
check(12,6)
check(12,7)
check(12,13)
check(12,9)
check(3,4)'''
solve()


import sys
input = sys.stdin.buffer.readline

n = int(input())
a = list(map(int, input().split()))

if n == 1:
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    print(1, 1)
    print(-a[0])
    exit()

res = []
length = n - 1
print(1, n - 1)
for i in range(n - 1):
    add = a[i] % n
    res.append(length * add)
    a[i] += length * add
print(*res)

res = []
length = n
print(1, n)
for i in range(n):
    if i == n - 1:
        res.append(0)
        continue
    res.append(-a[i])
    a[i] -= a[i]
print(*res)

print(n, n)
print(-a[-1])


######################################################
############Created by Devesh Kumar###################
#############devesh1102@gmail.com####################
##########For CodeForces(Devesh1102)#################
#####################2020#############################
######################################################
import sys
input = sys.stdin.readline

# import sys
import heapq
import copy
import math
import decimal

# import sys.stdout.flush as flush
# from decimal import *
#heapq.heapify(li)
#
#heapq.heappush(li,4)
#
#heapq.heappop(li)
#
# &    Bitwise AND Operator    10 & 7 = 2
# |    Bitwise OR Operator    10 | 7 = 15
# ^    Bitwise XOR Operator    10 ^ 7 = 13

# <<    Bitwise Left Shift operator    10<<2 = 40
# >>    Bitwise Right Shift Operator
# '''############ ---- Input Functions ---- #######Start#####'''

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def insr2():
    s = input()
    return((s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
############ ---- Input Functions ---- #######End
# #####

ans = 0
def pr_list(a):
    print( *a , sep=" ")
def main():
    # tests =  inp()
    tests = 1
    mod = 1000000007
    limit = 10**18
    ans = 0
    stack = []
    hashm = {}
    arr = []
    heapq.heapify(arr)

    for test in range(tests):
        n = inp()
        a = inlt()
        if n!= 1:
            l = 1
            r = n-1
            nums = []
            for i in range(l,r+1):
                if a[i]%n == 0:
                    nums.append(0)
                else:
                    nums.append((((n-1) *(a[i]%n))))
                    a[i] = a[i] + ((n-1) *(a[i]%n))
            pr_list([l+1,r+1])
            pr_list(nums)
        else:
            pr_list([1,1])
            print(0)
        l =0
        r = 0
        pr_list([1,1])
        print( -1* (a[0] %n))
        a[0] = a[0] - (a[0] %n)

        l = 0
        r = n-1
        pr_list([l+1,r+1])
        nums = []
        for i in range(l,r+1):
            nums.append(-1*(a[i]))
        pr_list(nums)

if __name__== "__main__":
    main()


######################################################
############Created by Devesh Kumar###################
#############devesh1102@gmail.com####################
##########For CodeForces(Devesh1102)#################
#####################2020#############################
######################################################
import sys
input = sys.stdin.readline

# import sys
import heapq
import copy
import math
import decimal

# import sys.stdout.flush as flush
# from decimal import *
#heapq.heapify(li)
#
#heapq.heappush(li,4)
#
#heapq.heappop(li)
#
# &    Bitwise AND Operator    10 & 7 = 2
# |    Bitwise OR Operator    10 | 7 = 15
# ^    Bitwise XOR Operator    10 ^ 7 = 13

# <<    Bitwise Left Shift operator    10<<2 = 40
# >>    Bitwise Right Shift Operator
# '''############ ---- Input Functions ---- #######Start#####'''

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def insr2():
    s = input()
    return((s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
############ ---- Input Functions ---- #######End
# #####

ans = 0
def pr_list(a):
    print( *a , sep=" ")
def main():
    # tests =  inp()
    tests = 1
    mod = 1000000007
    limit = 10**18
    ans = 0
    stack = []
    hashm = {}
    arr = []
    heapq.heapify(arr)

    for test in range(tests):
        n = inp()
        a = inlt()
        l = 1
        r = n-1
        nums = []
        for i in range(l,r+1):
            if a[i]%n == 0:
                nums.append(0)
            else:
                nums.append((((n-1) *(a[i]%n))))
                a[i] = a[i] + ((n-1) *(a[i]%n))
        pr_list([l,r])
        pr_list(nums)
        l =0
        r = 0
        pr_list([0,0])
        print( a[0] %n)
        a[0] = a[0] - (a[0] %n)

        l = 0
        r = n-1
        pr_list([l,r])
        nums = []
        for i in range(l,r+1):
            nums.append(-1*(a[i]//n))
        pr_list(nums)

if __name__== "__main__":
    main()


######################################################
############Created by Devesh Kumar###################
#############devesh1102@gmail.com####################
##########For CodeForces(Devesh1102)#################
#####################2020#############################
######################################################
import sys
input = sys.stdin.readline

# import sys
import heapq
import copy
import math
import decimal

# import sys.stdout.flush as flush
# from decimal import *
#heapq.heapify(li)
#
#heapq.heappush(li,4)
#
#heapq.heappop(li)
#
# &    Bitwise AND Operator    10 & 7 = 2
# |    Bitwise OR Operator    10 | 7 = 15
# ^    Bitwise XOR Operator    10 ^ 7 = 13

# <<    Bitwise Left Shift operator    10<<2 = 40
# >>    Bitwise Right Shift Operator
# '''############ ---- Input Functions ---- #######Start#####'''

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def insr2():
    s = input()
    return((s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
############ ---- Input Functions ---- #######End
# #####

ans = 0
def pr_list(a):
    print( *a , sep=" ")
def main():
    # tests =  inp()
    tests = 1
    mod = 1000000007
    limit = 10**18
    ans = 0
    stack = []
    hashm = {}
    arr = []
    heapq.heapify(arr)

    for test in range(tests):
        n = inp()
        a = inlt()
        l = 1
        r = n-1
        nums = []
        for i in range(l,r+1):
            if a[i]%n == 0:
                nums.append(0)
            else:
                nums.append((((n-1) *(a[i]%n))))
                a[i] = a[i] + ((n-1) *(a[i]%n))
        pr_list([l+1,r+1])
        pr_list(nums)
        l =0
        r = 0
        pr_list([1,1])
        print( -1* (a[0] %n))
        a[0] = a[0] - (a[0] %n)

        l = 0
        r = n-1
        pr_list([l+1,r+1])
        nums = []
        for i in range(l,r+1):
            nums.append(-1*(a[i]))
        pr_list(nums)

if __name__== "__main__":
    main()


######################################################
############Created by Devesh Kumar###################
#############devesh1102@gmail.com####################
##########For CodeForces(Devesh1102)#################
#####################2020#############################
######################################################
import sys
input = sys.stdin.readline

# import sys
import heapq
import copy
import math
import decimal

# import sys.stdout.flush as flush
# from decimal import *
#heapq.heapify(li)
#
#heapq.heappush(li,4)
#
#heapq.heappop(li)
#
# &    Bitwise AND Operator    10 & 7 = 2
# |    Bitwise OR Operator    10 | 7 = 15
# ^    Bitwise XOR Operator    10 ^ 7 = 13

# <<    Bitwise Left Shift operator    10<<2 = 40
# >>    Bitwise Right Shift Operator
# '''############ ---- Input Functions ---- #######Start#####'''

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def insr2():
    s = input()
    return((s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
############ ---- Input Functions ---- #######End
# #####

ans = 0
def pr_list(a):
    print( *a , sep=" ")
def main():
    # tests =  inp()
    tests = 1
    mod = 1000000007
    limit = 10**18
    ans = 0
    stack = []
    hashm = {}
    arr = []
    heapq.heapify(arr)

    for test in range(tests):
        n = inp()
        a = inlt()
        l = 1
        r = n-1
        nums = []
        for i in range(l,r+1):
            if a[i]%n == 0:
                nums.append(0)
            else:
                nums.append((((n-1) *(a[i]%n))))
                a[i] = a[i] + ((n-1) *(a[i]%n))
        pr_list([l+1,r+1])
        pr_list(nums)
        l =0
        r = 0
        pr_list([1,1])
        print( a[0] %n)
        a[0] = a[0] - (a[0] %n)

        l = 0
        r = n-1
        pr_list([l+1,r+1])
        nums = []
        for i in range(l,r+1):
            nums.append(-1*(a[i]//n))
        pr_list(nums)

if __name__== "__main__":
    main()


######################################################
############Created by Devesh Kumar###################
#############devesh1102@gmail.com####################
##########For CodeForces(Devesh1102)#################
#####################2020#############################
######################################################
import sys
input = sys.stdin.readline

# import sys
import heapq
import copy
import math
import decimal

# import sys.stdout.flush as flush
# from decimal import *
#heapq.heapify(li)
#
#heapq.heappush(li,4)
#
#heapq.heappop(li)
#
# &    Bitwise AND Operator    10 & 7 = 2
# |    Bitwise OR Operator    10 | 7 = 15
# ^    Bitwise XOR Operator    10 ^ 7 = 13

# <<    Bitwise Left Shift operator    10<<2 = 40
# >>    Bitwise Right Shift Operator
# '''############ ---- Input Functions ---- #######Start#####'''

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def insr2():
    s = input()
    return((s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
############ ---- Input Functions ---- #######End
# #####

ans = 0
def pr_list(a):
    print( *a , sep=" ")
def main():
    # tests =  inp()
    tests = 1
    mod = 1000000007
    limit = 10**18
    ans = 0
    stack = []
    hashm = {}
    arr = []
    heapq.heapify(arr)

    for test in range(tests):
        n = inp()
        a = inlt()
        l = 1
        r = n-1
        nums = []
        for i in range(l,r+1):
            if a[i]%n == 0:
                nums.append(0)
            else:
                nums.append((((n-1) *(a[i]%n))))
                a[i] = a[i] + ((n-1) *(a[i]%n))
        pr_list([l+1,r+1])
        pr_list(nums)
        l =0
        r = 0
        pr_list([1,1])
        print( a[0] %n)
        a[0] = a[0] - (a[0] %n)

        l = 0
        r = n-1
        pr_list([l+1,r+1])
        nums = []
        for i in range(l,r+1):
            nums.append(-1*(a[i]))
        pr_list(nums)

if __name__== "__main__":
    main()


#!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase
import threading
from collections import defaultdict,Counter
# from bisect import bisect_right
import heapq
from math import ceil,floor

def main():
    n=int(input())
    arr=list(map(int,input().split()))

    print(1,1)
    print(-arr[0])
    if n==1:
        print(1,1)
        print(0)
        print(1,1)
        print(0)
        return
    print(2,n)
    a=[]
    for i in range(1,n):
        k=arr[i]%n
        ad=k*(n-1)
        if arr[i]+ad>10**18 or arr[i]+ad<-10**18:
            ad=-(n-k)*(n-1)
        a.append(ad)
        assert(ad%(n-1)==0)
        arr[i]=arr[i]+ad

    print(*a)
    print(1,n)
    a=[0]
    for i in range(1,n):
        assert(abs(arr[i])<10**18)
        assert(arr[i]%n==0)
        a.append(-arr[i])
    print(*a)

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    for i in range(1):
        main()


n = int(input())
s = list(map(int, input().split()))
if n == 1:
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    print(1, 1)
    print(-s[0])
else:
    print(1, 1)
    print(-s[0])
    print(1, n)
    print(0, end=' ')
    for i in range(1, n):
        print(-n * (s[i]), end=' ')
    print('')
    print(2, n)
    for i in range(1, n):
        print((n - 1) * s[i], end=' ')
    print('')


N, = map(int, input().split())
X = list(map(int, input().split()))
if N>1:
    print(1, N)
    Y = [0]*N
    for i in range(N):
        Y[i] = -(X[i]%(N-1))*N
        X[i] = -(X[i]+Y[i])
    print(*Y)
    print(1, 1)
    print(X[0])
    print(2, N)
    print(*X[1:])
else:
    print(1, 1)
    print(-X[0])
    print(1,1)
    print(0)
    print(1,1)
    print(0)


N, = map(int, input().split())
X = list(map(int, input().split()))
print(1, N)
Y = [0]*N
for i in range(N):
    Y[i] = -(X[i]%(N-1))*N
    X[i] = -(X[i]+Y[i])
print(*Y)
print(1, 1)
print(X[0])
print(2, N)
print(*X[1:])


import os
from io import BytesIO

input = BytesIO(os.read(0, os.fstat(0).st_size)).readline

def lii(): return list(map(int, input().split()))
def ii(): return int(input())

n = ii()
A = lii()

print(1, n)

for i in range(n-1):
	print(-n*A[i], end = ' ')
print(0)

print(1, n-1)
for i in range(n-1):
	print((n-1)*A[i], end = ' ')
print()

print(n, n)
print(-A[-1])


import os
from io import BytesIO

input = BytesIO(os.read(0, os.fstat(0).st_size)).readline

def lii(): return list(map(int, input().split()))
def ii(): return int(input())

def main():
	n = ii()
	A = lii()

	if n == 1:
		print(1, 1)
		print(0)
		print(1, 1)
		print(0)
		print(1, 1)
		print(-A[0])
		return

	print(1, n)
	for i in range(n-1):
		print(-n*A[i], end = ' ')
	print(0)

	print(1, n-1)
	for i in range(n-1):
		print((n-1)*A[i], end = ' ')
	print()

	print(n, n)
	print(-A[-1])

if __name__ == '__main__':
	main()


import sys
input = sys.stdin.readline

N = int(input())
A = [int(_) for _ in input().split()]

if N == 1:
    print(1, 1)
    print(-A[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
else:
    print(1, N-1)
    R = [(N-1) * (A[i] % N) for i in range(N-1)]
    for el in R:
        assert (el % (N-1)) == 0
    B = [A[i] + R[i] for i in range(N-1)]
    print(' '.join(map(str, R)))
    print(N, N)
    print(-A[N-1])
    B.append(0)
    # print(B)
    print(1, N)
    for el in B:
        assert (el % N) == 0
    print(' '.join(map(str, [-el for el in B])))


import sys
input = sys.stdin.readline

n=int(input())
A=list(map(int,input().split()))

if n==1:
    print(1,1)
    print(1)

    print(1,1)
    print(1)

    print(1,1)
    print(-A[0]-2)

    sys.exit()

print(1,n)
B=[n*((n-1)-a%(n-1)) for a in A]
print(*B)

C=[-A[i]-B[i] for i in range(n)]

print(1,1)
print(C[0])

print(2,n)
print(*C[1:])


n = int(input())
a = list(map(int,input().split()))
if n == 1:
    print(1,1)
    print(a[0] * -1)
    exit()
print(1,n-1)
for i in range(0,n-1):
    print((a[i] % n) * (n - 1),end=" ")
    a[i] += (a[i] % n) * (n - 1)
print()
print(n,n)
print(a[-1] * -1)
a[-1] = 0
print(1,n)
for i in range(n):
    print(a[i]*-1,end=" ")
    assert a[i] % n == 0


n = int(input())
a = list(map(int,input().split()))

print(1,n-1)
for i in range(0,n-1):
    print((a[i] % n) * (n - 1),end=" ")
    a[i] += (a[i] % n) * (n - 1)
print()
print(n,n)
print(a[-1] * -1)
a[-1] = 0
print(1,n)
for i in range(n):
    print(a[i]*-1,end=" ")


n = int(input())
a = list(map(int,input().split()))
if n == 1:
    print(1,1)
    print(a[0] * -1)
    print(1,1)
    print(0)
    print(1,1)
    print(0)
    exit()
print(1,n-1)
for i in range(0,n-1):
    print((a[i] % n) * (n - 1),end=" ")
    a[i] += (a[i] % n) * (n - 1)
print()
print(n,n)
print(a[-1] * -1)
a[-1] = 0
print(1,n)
for i in range(n):
    print(a[i]*-1,end=" ")
    assert a[i] % n == 0


import sys
readline = sys.stdin.readline

N = int(readline())
A = list(map(int, readline().split()))

if N == 1:
    print(1, 1)
    print(-A[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
else:
    print(1, N)
    L1 = [0] + [-a*N for a in A[1:]]
    print(*L1)
    print(2, N)
    L2 = [a*(N-1) for a in A[1:]]
    print(*L2)
    print(1, 1)
    print(-A[0])


n=int(input())
a=list(map(int,input().split()))

print(n,n)
print(-a[-1])

print(1,n-1)
res_2 = [a[i]*(n-1) for i in range(n-1)]
print(*res_2)

print(1,n)
res_3 = [-a[i]*n for i in range(n)]
res_3[-1] = 0

print(*res_3)


n=int(input())
a=list(map(int,input().split()))

if n!=1:
    print(n,n)
    print(-a[-1])

    print(1,n-1)
    res_2 = [a[i]*(n-1) for i in range(n-1)]
    print(*res_2)

    print(1,n)
    res_3 = [-a[i]*n for i in range(n)]
    res_3[-1] = 0

    print(*res_3)
else:
    print(1,1)
    print(-a[0])
    print(1,1)
    print(0)
    print(1,1)
    print(0)


n=int(input())
a=list(map(int,input().split()))

print(n)
print(a[-1])

print(1,n-1)
res_2 = [a[i]*(n-1) for i in range(n-1)]
print(*res_2)

print(1,n)
res_3 = [-a[i]*n for i in range(n)]
res_3[-1] = 0

print(*res_3)


n=int(input())
a=list(map(int,input().split()))

print(n)
print(-a[-1])

print(1,n-1)
res_2 = [a[i]*(n-1) for i in range(n-1)]
print(*res_2)

print(1,n)
res_3 = [-a[i]*n for i in range(n)]
res_3[-1] = 0

print(*res_3)


from sys import stdin, stdout

# 1: choose all a, a - a*n = a*(1-n)
# 2: choose n-1 a, a*(1-n) + a*(n-1)
# 3: choose last a, a*(1-n) - a*(1-n)
def multiples_of_length(n, a_a):
    if n == 1:
        return [[1,1], [1], [1,1], [1], [1,1], [-a_a[0]-2]]

    ans_a = [[] for _ in range(6)]
    # step 1
    ans_a[0].append(1)
    ans_a[0].append(n)

    # step 2
    ans_a[2].append(1)
    ans_a[2].append(n-1)

    # step 3
    ans_a[4].append(n)
    ans_a[4].append(n)

    for i in range(n):
        ans_a[1].append(-a_a[i]*n)
        if i < n-1:
            ans_a[3].append(a_a[i] * (n-1))
        elif i == n-1:
            ans_a[5].append(-a_a[i]*(1-n))

    return ans_a

n = int(stdin.readline())
a_a = list(map(int, stdin.readline().split()))

ans_a = multiples_of_length(n, a_a)
for ans in ans_a:
    stdout.write(' '.join(map(str, ans)) + '\n')


from sys import stdin, stdout

# 1: choose all a, a - a*n = a*(1-n)
# 2: choose n-1 a, a*(1-n) + a*(n-1)
# 3: choose last a, a*(1-n) - a*(1-n)
def multiples_of_length(n, a_a):

    ans_a = [[] for _ in range(6)]
    # step 1
    ans_a[0].append(1)
    ans_a[0].append(n)

    # step 2
    ans_a[2].append(1)
    ans_a[2].append(n-1)

    # step 3
    ans_a[4].append(n)
    ans_a[4].append(n)

    for i in range(n):
        ans_a[1].append(-a_a[i]*n)
        if i < n-1:
            ans_a[3].append(a_a[i] * (n-1))
        elif i == n-1:
            ans_a[5].append(-a_a[i]*(1-n))

    return ans_a

n = int(stdin.readline())
a_a = list(map(int, stdin.readline().split()))

ans_a = multiples_of_length(n, a_a)
for ans in ans_a:
    stdout.write(' '.join(map(str, ans)) + '\n')


import sys
n=int(input())
a=list(map(int,input().split()))
if n==1:
  print(1,1)
  print(-a[0])
  print(1,1)
  print(0)
  print(1,1)
  print(0)
  sys.exit()
print(1,n-1)
ans=[]
for i in range(n-1):
  l=a[i]%n
  ans.append(str(l*(n-1)))
  a[i]+=l*(n-1)
print(' '.join(ans))
print(n,n)
print(-a[n-1])
a[n-1]=0
print(1,n)
ans=[]
for i in range(n):
  ans.append(str(-a[i]))
print(' '.join(ans))


N = int(input())

a_vec = input().split(" ")
a_vec = [int(a) for a in a_vec]

if (N == 1):
    print(f"1 1\n0\n1 1\n0\n1 1\n{-a_vec[0]}")
else:

    print(f"1 {N}")

    s_vec = ["" for _ in range(N)]
    for n in range(0, N-1):
            s_vec[n] = str(-a_vec[n]*N)
    s_vec[N-1] = "0"
    print(" ".join(s_vec))

    print(f"1 {N-1}")
    s_vec = ["" for _ in range(N-1)]
    for n in range(0, N-1):
            s_vec[n] = str(a_vec[n]*(N-1))

    print(" ".join(s_vec))

    print(f"{N} {N}\n{-a_vec[N-1]}")


N = int(input())

a_vec = input().split(" ")
a_vec = [int(a) for a in a_vec]

if (N == 1):
    print(f"1 1\n0\n1 1\n0\n1 1\n{-a_vec[0]}")
else:

    print(f"1 {N}")
    s = ""

    for n in range(0, N-1):
            s = s + str(-a_vec[n]*N) + " "
    s = s + "0"
    print(s)

    print(f"1 {N-1}")
    s = ""
    for n in range(0, N-1):
        if(n != N-2):
            s = s + str(a_vec[n]*(N-1)) + " "
        else:
            s = s + str(a_vec[n]*(N-1))
    print(s)

    print(f"{N} {N}\n{-a_vec[N-1]}")


from sys import stdin
input = stdin.readline
n = int(input())
a = [*map(lambda x:int(x), input().split())]
print("{0} {0}".format(n))
print(a[n-1] * (n-1))
print("1 {}".format(n-1))
print(*map(lambda x:x*(n-1), a[:n-1]))
print("1 {}".format(n))
print(*map(lambda x:x*n*-1, a))


from sys import stdin
input = stdin.readline
n = int(input())
a = [*map(lambda x:int(x), input().split())]
if n != 1:
	print("{0} {0}".format(n))
	print(a[n-1] * (n-1))
	print("1 {}".format(n-1))
	print(*map(lambda x:x*(n-1), a[:n-1]))
else:
	print("1 1")
	print("0")
	print("1 1")
	print("0")
print("1 {}".format(n))
print(*map(lambda x:x*n*(-1), a))


from sys import stdin
input = stdin.readline
n = int(input())
a = [*map(lambda x:int(x), input().split())]
if n != 1:
	print("{0} {0}".format(n))
	print(a[n-1] * (n-1))
	print("1 {}".format(n-1))
	print(*map(lambda x:x*(n-1), a[:n-1]))
print("1 {}".format(n))
print(*map(lambda x:x*n*-1, a))


import sys

input = sys.stdin.readline

n = int(input())
a = [int(x) for x in input().split()]
if n == 1:
    print(1, 1, sep = ' ')
    print(a[0])
    print(1, 1, sep = ' ')
    print(a[0])
    print(1, 1, sep = ' ')
    print(-a[0] * 3)
    exit()
print(1, n - 1, sep = ' ', end = '\n')
for i in range(n - 1):
    k = a[i] * (n - 1)
    a[i] += a[i] * (n - 1)
    print(k, end = ' ')
print("")
print(2, n, sep = ' ')
for i in range(1, n):
    k = 0
    if i == n - 1:
        k = a[i] * (n - 1)
        a[i] += a[i] * (n - 1)
    print(k, end = ' ')
print('')
print(1, n, sep = ' ')
for i in range(n):
    print(-a[i], end = ' ')


import sys, math
input = sys.stdin.readline

def getInts():
    return [int(s) for s in input().split()]

def getInt():
    return int(input())

def getStrs():
    return [s for s in input().split()]

def getStr():
    return input().strip()

def listStr():
    return list(input().strip())

import collections as col
import math

def solve():
    N = getInt()
    A = getInts()
    print(1,1)
    print(-A[0])
    A[0] = 0
    print(2,N)
    arr = []
    for j in range(1,N):
        arr.append((N-1)*A[j])
        A[j] *= -N
    print(*arr)
    print(1,N)
    print(*A)
    return

#for _ in range(getInt()):
solve()


import sys, math
input = sys.stdin.readline

def getInts():
    return [int(s) for s in input().split()]

def getInt():
    return int(input())

def getStrs():
    return [s for s in input().split()]

def getStr():
    return input().strip()

def listStr():
    return list(input().strip())

import collections as col
import math

def solve():
    N = getInt()
    A = getInts()
    print(1,1)
    print(-A[0])
    if N == 1:
        print(1,1)
        print(0)
        print(1,1)
        print(0)
        return
    A[0] = 0
    print(2,N)
    arr = []
    for j in range(1,N):
        arr.append((N-1)*A[j])
        A[j] *= -N
    print(*arr)
    print(1,N)
    print(*A)
    return

#for _ in range(getInt()):
solve()


import sys, math
input = sys.stdin.readline

def getInts():
    return [int(s) for s in input().split()]

def getInt():
    return int(input())

def getStrs():
    return [s for s in input().split()]

def getStr():
    return input().strip()

def listStr():
    return list(input().strip())

import collections as col
import math

def solve():
    N = getInt()
    A = getInts()
    print(1,1)
    print(-A[0])
    print(2,N)
    arr = []
    for j in range(1,N):
        arr.append((N-1)*A[j])
        A[j] *= -N
    print(*arr)
    print(1,N)
    print(*A[j])
    return

#for _ in range(getInt()):
print(solve())


import sys
input = sys.stdin.readline
n=int(input())
a=list(map(int,input().split()))
print(1,1)
print(-a[0])
a[0]=0
if n==1:
    print(1,1)
    print(0)
else:
    print(2,n)
    for i in range(1,n):
        x=a[i]%n
        x*=(n-1)
        print(x,end=" ")
        a[i]+=x
    print()
print(1,n)
for i in range(n):
    print(-a[i],end=" ")
print()


import sys
input = sys.stdin.readline
n=int(input())
a=list(map(int,input().split()))
print(1,1)
print(-a[0])
a[0]=0
print(2,n)
for i in range(1,n):
    x=a[i]%n
    x*=(n-1)
    print(x,end=" ")
    a[i]+=x
print()
print(1,n)
for i in range(n):
    print(-a[i],end=" ")
print()


n = int(input())
a = list(map(int, input().split()))

if n == 1:
    print('1 1', -a[0], '1 1', '0', '1 1', '0', sep='\n')
    exit(0)

print(1, n)
for i in range(n):
    print(-a[i] * n, end = ' ')
    a[i] -= a[i] * n
print()
print(1, n - 1)
for i in range(n - 1):
    print(-a[i], end = ' ')
    a[i] = 0
print()

print(2, n)
for i in range(1, n):
    print(-a[i], end = ' ')
    a[i] = 0
print()


import sys
I=lambda:list(map(int,input().split()))
n,=I()
l=I()
if n==1:
    print(1,1)
    print(1)
    print(1,1)
    print(1)
    print(1,1)
    print(-l[0]-2)
    sys.exit()
b=(n-1)
a=[n*(b-(l[i]%b)) for i in range(n)]
print(1,n)
print(*a)
b=[-l[i]-a[i] for i in range(n)]
print(1,1)
print(b[0])
print(2,n)
print(*b[1:])


n= int(input())
a=[int(X) for X in input().split()]
if n<=3:
    if n==3:
        print(1,1)
        print(a[1]*-1)
        print(3,3)
        print(a[3]*-1)
        print(2,2)
        print(a[2]*-1)
    elif n==2:
        print(1,1)
        print(a[1])
        print(1,1)
        print(-1*2*a[1])
        print(2,2)
        print(-1*a[2])
    else:
        print(1, 1)
        print(a[1])
        print(1,1)
        print(2*a[1])
        print(1,1)
        print(-1*3*a[1])

print(1,n)
for i in range(n):

    print((-1)*n*a[i],end=" ")
    a[i]=a[i]-n*(a[i])
print()
print(1,n-1)
for i in range(n-1):
    print(-1*a[i],end=" ")
print()
print(n,n)
print(-1*a[n-1])


n= int(input())
a=[int(X) for X in input().split()]
print(1,n)
for i in range(n):

    print((-1)*n*a[i],end=" ")
    a[i]=a[i]-n*(a[i])
print()
print(1,n-1)
for i in range(n-1):
    print(-1*a[i],end=" ")
print()
print(n,n)
print(-1*a[n-1])


n= int(input())
a=[int(X) for X in input().split()]
if n<=3:
    if n==3:
        print(1,1)
        print(a[0]*-1)
        print(3,3)
        print(a[2]*-1)
        print(2,2)
        print(a[1]*-1)
    elif n==2:
        print(1,1)
        print(a[0])
        print(1,1)
        print(-1*2*a[0])
        print(2,2)
        print(-1*a[1])
    else:
        print(1, 1)
        print(a[0])
        print(1,1)
        print(2*a[0])
        print(1,1)
        print(-1*3*a[0])

else:
    print(1,n)
    for i in range(n):

        print((-1)*n*a[i],end=" ")
        a[i]=a[i]-n*(a[i])
    print()
    print(1,n-1)
    for i in range(n-1):
        print(-1*a[i],end=" ")
    print()
    print(n,n)
    print(-1*a[n-1])


n= int(input())
a=[int(X) for X in input().split()]
if n<=3:
    if n==3:
        print(1,1)
        print(a[0]*-1)
        print(3,3)
        print(a[2]*-1)
        print(2,2)
        print(a[1]*-1)
    elif n==2:
        print(1,1)
        print(-1*a[0])
        print(1,1)
        print(0)
        print(2,2)
        print(-1*a[1])
    else:
        print(1, 1)
        print(a[0]*-1)
        print(1,1)
        print(0)
        print(1,1)
        print(0)

else:
    print(1,n)
    for i in range(n):

        print((-1)*n*a[i],end=" ")
        a[i]=a[i]-n*(a[i])
    print()
    print(1,n-1)
    for i in range(n-1):
        print(-1*a[i],end=" ")
    print()
    print(n,n)
    print(-1*a[n-1])


n=int(input())
a=list(map(int,input().split()))
print("1 1\n"+str((n-1)*a[0]))
if n>=2:
  print(2,n)
  print(*[(n-1)*a[i] for i in range(1,n)])
else:print("1 1\n0")
print(1,n)
print(*[-n*a[i]for i in range(n)])


n=int(input())
a=[int(x) for x in input().split()]
n=len(a)
if n==1:
    print('1 1\n0\n1 1\n0\n1 1\n{}'.format(-a[0]))
else:
    print('1 1\n{}'.format(a[0]*(n-1)))
    print('2 {}'.format(n))
    b=[]
    for i in range(1,n):
        b.append(a[i]*(n-1))
    print(' '.join([str(x) for x in b]))

    print('1 {}'.format(n))
    print(' '.join([str(-x*n) for x in a]))


if __name__ == "__main__":
    n = int(input())
    arr = [int(x) for x in input().split()]

    if n == 1:
        print(1, 1)
        print(-arr[0])
        print(1, 1)
        print(0)
        print(1, 1)
        print(0)
    else:
        # fix first
        print(1, 1)
        print(n - arr[0])
        arr[0] = n

        # fix rest
        print(2, n)

        for i in range(1, n):
            print((arr[i] % n) * (n - 1), end=' ')
            arr[i] += (arr[i] % n) * (n - 1)
            assert abs(arr[i]) % n == 0
        print()

        # fix all
        print(1, n)
        print(*[-x for x in arr])


if __name__ == "__main__":
    n = int(input())
    arr = [int(x) for x in input().split()]

    if n == 1:
        print(1, 1)
        print(-arr[0])
        print(1, 1)
        print(0)
        print(1, 1)
        print(0)
    else:
        # fix first
        print(1, 1)
        print(n - arr[0])
        arr[0] = n

        # fix rest
        print(2, n)
        for i in range(1, n):
            arr[i] += (arr[i] % n) * (n - 1)
            assert arr[i] % n == 0
        print(*arr[1:])

        # fix all
        print(1, n)
        print(*[-x for x in arr])


# region fastio  # from https://codeforces.com/contest/1333/submission/75948789
import sys, io, os

BUFSIZE = 8192

class FastIO(io.IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = io.BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(io.IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
#endregion

N = int(input())
A = list(map(int, input().split()))
if N==1:
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    print(1, 1)
    print(-A[0])
    exit()
print(1, N)
Ans1 = [0] + [-a*N for a in A[1:]]
print(*Ans1)
print(2, N)
Ans2 = [a*(N-1) for a in A[1:]]
print(*Ans2)
print(1, 1)
print(-A[0])


# c = int(input())
# for i in range(c):
#     n = int(input())
#     a = list(map(int, input().split()))
#     point = 0
#     pos = 0
#     while pos<n:
#         FriendTurn()
#         MyTurn()
#     print(point)

n = int(input())
a = list(map(int, input().split()))
if n==1:
    print(1, 1, '\n',
          a[0], '\n',
          1, 1, '\n',
          0, '\n',
          1, 1, '\n',
          0,)
else:
    print(1, n-1)
    for i in range(0, n-1):
        print(a[i]*(n-1), end=' ')
    print('\n', 1, n)
    for i in a:
        print(i*(-n), end=' ')
    print('\n', n, n)
    print(a[n-1]*(n-1))


# c = int(input())
# for i in range(c):
#     n = int(input())
#     a = list(map(int, input().split()))
#     point = 0
#     pos = 0
#     while pos<n:
#         FriendTurn()
#         MyTurn()
#     print(point)

n = int(input())
a = list(map(int, input().split()))
if n==1:
    print(1, 1)
    print(-a[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
else:
    print(1, n-1)
    for i in range(0, n-1):
        print(a[i]*(n-1), end=' ')
    print('\n', 1, n)
    for i in a:
        print(i*(-n), end=' ')
    print('\n', n, n)
    print(a[n-1]*(n-1))


# c = int(input())
# for i in range(c):
#     n = int(input())
#     a = list(map(int, input().split()))
#     point = 0
#     pos = 0
#     while pos<n:
#         FriendTurn()
#         MyTurn()
#     print(point)

n = int(input())
a = list(map(int, input().split()))
print(1, n-1)
for i in range(0, n-1):
    print(a[i]*(n-1), end=' ')
print('\n', 1, n)
for i in a:
    print(i*(-n), end=' ')
print('\n', n, n)
print(a[n-1]*(n-1))


# c = int(input())
# for i in range(c):
#     n = int(input())
#     a = list(map(int, input().split()))
#     point = 0
#     pos = 0
#     while pos<n:
#         FriendTurn()
#         MyTurn()
#     print(point)

n = int(input())
a = list(map(int, input().split()))
if n==1:
    print(1, 1)
    print(a[0])
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
else:
    print(1, n-1)
    for i in range(0, n-1):
        print(a[i]*(n-1), end=' ')
    print('\n', 1, n)
    for i in a:
        print(i*(-n), end=' ')
    print('\n', n, n)
    print(a[n-1]*(n-1))


n = int(input())
arr = list(map(int, input().split()))
print(1, 1)
print(-arr[0])
arr[0] = 0
print(1, n)
print(*[-e*n for e in arr])
print(2, n)
print(*[e*(n-1) for e in arr])


n = int(input())
arr = list(map(int, input().split()))
print(1, 1)
print(-arr[0])
arr[0] = 0
print(1, n)
print(*[-e*n for e in arr])
print(2, n)
print(*[e*(n-1) for e in arr[1:]])


n = int(input())
if n == 1:
    print(1, 1)
    print(-int(input()))
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    exit()

arr = list(map(int, input().split()))
print(1, 1)
print(-arr[0])
arr[0] = 0
print(1, n)
print(*[-e*n for e in arr])
print(2, n)
print(*[e*(n-1) for e in arr[1:]])


n = int(input())
l = [*map(int,input().split())]
if(n == 1):
    print(1,1)
    print(-1 * l[0])
    print(1,1)
    print(-1)
    print(1,1)
    print(1)
else:
    print(1,1)
    print(-l[0])
    print(2,n)
    for i in range(1,n):
        l[i] *= (n - 1)
        print(l[i],end=" ")
    print()
    print(2,n)
    for i in range(1,n):
        print(-1 * l[i],end = " ")


n = int(input())
l = [*map(int,input().split())]
if(n == 1):
    print(1,1)
    print(-1 * l[0])
    print(1,1)
    print(-1)
    print(1,1)
    print(1)
else:
    print(1,1)
    print(-l[0])
    print(2,n)
    for i in range(1,n):
        l[i] += l[i] * (n - 1)
        print(l[i],end=" ")
    print()
    print(2,n)
    for i in range(1,n):
        print(-1 * l[i],end = " ")


n = int(input())
l = [*map(int,input().split())]
if(n == 1):
    print(1,1)
    print(-1 * l[0])
    print(1,1)
    print(-1)
    print(1,1)
    print(1)
else:
    print(1,1)
    print(-l[0])
    print(2,n)
    for i in range(1,n):
        print(l[i] * (n - 1), end=" ")
        l[i] += l[i] * (n - 1)
    print()
    print(1,n)
    for i in range(0,n):
        print(-1 * l[i],end = " ")


n = int(input())
l = [*map(int,input().split())]
if(n == 1):
    print(1,1)
    print(-1 * l[0])
    print(1,1)
    print(-1)
    print(1,1)
    print(1)
else:
    print(1,1)
    print(-l[0])
    print(2,n)
    for i in range(1,n):
        print(l[i] * (n - 1), end=" ")
        l[i] += l[i] * (n - 1)
    print()
    print(2,n)
    for i in range(1,n):
        print(-1 * l[i],end = " ")


n = int(input())
l = [*map(int,input().split())]
if(n == 1):
    print(1,1)
    print(-1 * l[0])
    print(1,1)
    print(-1)
    print(1,1)
    print(1)
else:
    print(1,1)
    print(-l[0])
    print(2,n)
    for i in range(1,n):
        print(l[i] * (n - 1), end=" ")
        l[i] += l[i] * (n - 1)
    print()
    print(1,n)
    for i in range(0,n):
        if(i == 0):
            print(0,end=" ")
        else:
            print(-1 * l[i],end = " ")


import sys
n=int(input())
arr=list(map(int,sys.stdin.readline().strip().split()))
if n==1:
    sys.stdout.write("1 1 \n0 \n1 1\n0 \n1 1\n{}\n".format(-arr[0]))
else:
    sys.stdout.write("1 1\n{}\n".format(-arr[0]))
    sys.stdout.write("1 {}\n{}\n".format(n," ".join([str(0 if i==0 else -n*arr[i]) for i in range(n)])))
    sys.stdout.write("2 {}\n{}\n".format(n," ".join([str((n-1)*arr[i]) for i in range(1,n)])))


from sys import stdin
import sys
n = int(stdin.readline())
N = n
a = list(map(int,stdin.readline().split()))

if n == 1:
    print (1,1)
    print (-1*a[0])
    print (1,1)
    print (0)
    print (1,1)
    print (0)
    sys.exit()

print (1,n)
b = []
for i in range(n):

    b.append ( (N-1-a[i]%(N-1))*N )
    a[i] += b[-1]

print (*b)

print (1,n-1)
c = []
for i in range(n-1):
    c.append(-1*a[i])
    if a[i] % (n-1) != 0:
        #print (what)
        pass
print (*c)

print (n,n)
print (-1*a[-1])


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <iostream>

#define DEBUGA(x) printf(">>%d<<", x)
#define vDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("%d ", v[i]);} printf("\n")
#define iiDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("(%d, %d) ", v[i].first, v[i].second);} printf("\n")
#define INCR(v) sort(v.begin(), v.end())

using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main() {
	int n;
	scanf("%d", &n);

	vi grafo;
	grafo.resize(n);
	for(int i=0; i<n; i++) {
		scanf("%d", &grafo[i]);
	}

	vector<long long> dp(n+1, 0);
	dp[0] = 0;
	for(int i=0; i<=n-1; i++) {
		dp[i+1] = ((2*dp[i])%1000000007 + 2 - dp[grafo[i]-1]%1000000007)%1000000007;
		if(dp[i+1] < 0)
			dp[343223423] = 32403294;
	}

	cout << dp[n]%1000000007 << endl;

}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <iostream>

#define DEBUGA(x) printf(">>%d<<", x)
#define vDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("%d ", v[i]);} printf("\n")
#define iiDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("(%d, %d) ", v[i].first, v[i].second);} printf("\n")
#define INCR(v) sort(v.begin(), v.end())

using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main() {
	int n;
	scanf("%d", &n);

	vi grafo;
	grafo.resize(n);
	for(int i=0; i<n; i++) {
		scanf("%d", &grafo[i]);
	}

	vector<long long> dp(n+1, 0);
	dp[0] = 0;
	for(int i=0; i<=n-1; i++) {
		dp[i+1] = (dp[i]%1000000007+dp[i]%1000000007 + 2 - dp[grafo[i]-1]%1000000007)%1000000007;
	}

	cout << dp[n]%1000000007 << endl;

}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <stack>
#include <queue>

#define DEBUGA(x) printf(">>%d<<", x)
#define vDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("%d ", v[i]);} printf("\n")
#define iiDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("(%d, %d) ", v[i].first, v[i].second);} printf("\n")
#define INCR(v) sort(v.begin(), v.end())

using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main() {
	int n;
	scanf("%d", &n);

	vi grafo;
	grafo.resize(n);
	for(int i=0; i<n; i++) {
		scanf("%d", &grafo[i]);
	}

	vi dp(n+1, 0);
	dp[0] = 0;
	for(int i=0; i<=n-1; i++) {
		dp[i+1] = 2*dp[i] + 2 - dp[grafo[i]-1];
	}

	printf("%d\n", dp[n]%1000000007);

}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <iostream>

#define DEBUGA(x) printf(">>%d<<", x)
#define vDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("%d ", v[i]);} printf("\n")
#define iiDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("(%d, %d) ", v[i].first, v[i].second);} printf("\n")
#define INCR(v) sort(v.begin(), v.end())

using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main() {
	int n;
	scanf("%d", &n);

	vi grafo;
	grafo.resize(n);
	for(int i=0; i<n; i++) {
		scanf("%d", &grafo[i]);
	}

	vector<long long> dp(n+1, 0);
	dp[0] = 0;
	for(int i=0; i<=n-1; i++) {
		dp[i+1] = (dp[i]+dp[i] + 2 - dp[grafo[i]-1])%1000000007;
	}

	cout << dp[n]%1000000007 << endl;

}


#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <iostream>
#include <cstring>

using namespace std;

int main() {
	int n;
	scanf("%d", &n);
	int visitados[n];
	memset(visitados, 0, sizeof(visitados));
	int grafo[n][2];

	for(int i=0; i<n; i++) {
		int p;
		scanf("%d", &p);

		//primeiro i+1, segundo p
		grafo[i][0] = i+1;
		grafo[i][1] = p-1;
	}

	int state = 0;
	int soma = 0;
	while(state != n) {
		soma++;
		visitados[state]++;

		if(visitados[state]%2 != 0) {
			state = grafo[state][1];
		} else {
			state = grafo[state][0];
		}
	}

	printf("%d\n", soma);
}


#include <stdio.h>
#include <vector>

using namespace std;

typedef vector<int> vi;

vi visitados;
vector<vi> grafo;
int n;

int main() {
	scanf("%d", &n);

	grafo.resize(n);
	visitados.assign(n,0);

	for(int i=0; i<n; i++) {
		int p;
		scanf("%d", &p);

		//primeiro i+1, segundo p
		grafo[i].push_back(i+1);
		grafo[i].push_back(p-1);
	}

	int state = 0;
	while(state != n) {
		visitados[state]++;

		if(visitados[state]%2 != 0) {
			state = grafo[state][1];
		} else {
			state = grafo[state][0];
		}
	}

	int soma = 0;
	for(int i=0; i<visitados.size(); i++)
		soma += visitados[i];
	printf("%d\n", soma);
}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <iostream>

#define DEBUGA(x) printf(">>%d<<", x)
#define vDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("%d ", v[i]);} printf("\n")
#define iiDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("(%d, %d) ", v[i].first, v[i].second);} printf("\n")
#define INCR(v) sort(v.begin(), v.end())

using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main() {
	int n;
	scanf("%d", &n);

	vi grafo;
	grafo.resize(n);
	for(int i=0; i<n; i++) {
		scanf("%d", &grafo[i]);
	}

	vector<long long> dp(n+1, 0);
	dp[0] = 0;
	for(int i=0; i<=n-1; i++) {
		dp[i+1] = (dp[i]+dp[i]% + 2 - dp[grafo[i]-1]);
		if(dp[i+1] < 0 )
			dp[435345] = 98347534534;
	}

	cout << dp[n] << endl;

}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <iostream>

#define DEBUGA(x) printf(">>%d<<", x)
#define vDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("%d ", v[i]);} printf("\n")
#define iiDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("(%d, %d) ", v[i].first, v[i].second);} printf("\n")
#define INCR(v) sort(v.begin(), v.end())

using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main() {
	int n;
	scanf("%d", &n);

	vi grafo;
	grafo.resize(n);
	for(int i=0; i<n; i++) {
		scanf("%d", &grafo[i]);
	}

	vector<long long> dp(n+1, 0);
	dp[0] = 0;
	for(int i=0; i<=n-1; i++) {
		dp[i+1] = ( ((dp[i] + dp[i])%1000000007 + 2)%1000000007 - dp[grafo[i]-1] + 1000000007  )%1000000007;
	}

	cout << dp[n] << endl;

}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <iostream>

#define DEBUGA(x) printf(">>%d<<", x)
#define vDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("%d ", v[i]);} printf("\n")
#define iiDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("(%d, %d) ", v[i].first, v[i].second);} printf("\n")
#define INCR(v) sort(v.begin(), v.end())

using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main() {
	int n;
	scanf("%d", &n);

	vi grafo;
	grafo.resize(n);
	for(int i=0; i<n; i++) {
		scanf("%d", &grafo[i]);
	}

	vector<long long> dp(n+1, 0);
	dp[0] = 0;
	for(int i=0; i<=n-1; i++) {
		dp[i+1] = (dp[i]+dp[i]% + 2 - dp[grafo[i]-1]);
		if(dp[i+1] < 0 )
			dp[435345] = 98347534534;
	}

	cout << dp[n]%1000000007 << endl;

}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <iostream>

#define DEBUGA(x) printf(">>%d<<", x)
#define vDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("%d ", v[i]);} printf("\n")
#define iiDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("(%d, %d) ", v[i].first, v[i].second);} printf("\n")
#define INCR(v) sort(v.begin(), v.end())

using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main() {
	int n;
	scanf("%d", &n);

	vi grafo;
	grafo.resize(n);
	for(int i=0; i<n; i++) {
		scanf("%d", &grafo[i]);
	}

	vector<long long> dp(n+1, 0);
	dp[0] = 0;
	for(int i=0; i<=n-1; i++) {
		dp[i] = dp[i]%1000000007;
		dp[grafo[i]-1] = dp[grafo[i]-1]%1000000007;
		dp[i+1] = ( (dp[i] + dp[i])%1000000007 + 2 - dp[grafo[i]-1])%1000000007;
	}

	cout << dp[n]%1000000007 << endl;

}


#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <iostream>

#define DEBUGA(x) printf(">>%d<<", x)
#define vDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("%d ", v[i]);} printf("\n")
#define iiDEBUGA(v) for(int i=0; i<v.size(); i++) {printf("(%d, %d) ", v[i].first, v[i].second);} printf("\n")
#define INCR(v) sort(v.begin(), v.end())

using namespace std;

typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;

int main() {
	int n;
	scanf("%d", &n);

	vi grafo;
	grafo.resize(n);
	for(int i=0; i<n; i++) {
		scanf("%d", &grafo[i]);
	}

	vector<long long> dp(n+1, 0);
	dp[0] = 0;
	for(int i=0; i<=n-1; i++) {
		dp[i+1] = (dp[i]+dp[i] + 2 - dp[grafo[i]-1]);
		if(dp[i+1] < 0 )
			dp[435345] = 98347534534;
	}

	cout << dp[n]%1000000007 << endl;

}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector < int > vi;
typedef pair< int ,int > pii;
#define SIZE(X) ((int)(X.size()))
#define X first
#define Y second
#define LENGTH(X) ((int)(X.length()))
#define pb push_back
#define MP(X,Y) make_pair(X,Y)
#define MEM(a,b) memset(a,(b),sizeof(a))
#define tr(c,it) for(typeof((c).begin()) it = (c).begin(); it != (c).end(); it++)
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define ain(a,n) int ((a)[(n)]); for(int i=0; i<(n); i++) cin>>((a)[i])
typedef long long int int64;
typedef unsigned long long uLL;
#define FOR(i,n) for(int i=0;i<n;i++)
#define FU(i,a,n) for(int i=a;i<=n;i++)
#define FD(i,a,n) for(int i=n;i>=a;i--)
#define GI(n) scanf("%d",&n)
#define GS(n) scanf("%s"&s)
#define GII(n,m) scanf("%d %d",&n,&m)
#define PI(n) printf("%d\n",n)
#define PII(n,m) printf("%d %d\n",n,m)
#define PL(n) printf("%I64d\n",n)
#define PLL(n) printf("%I64d\n",n)
#define GLL(n) scanf("%I64d",&n)
#define GL(n) scanf("%I64d",&n)
#define PN printf("\n")
#define MAX 1007
# define mod 1000000007

int n,p[MAX],dp[MAX],ans=0;

int main(){
    ios::sync_with_stdio(0);
    cin>>n;
    FU(i,1,n) cin>>p[i];
    for(int i=1;i<=n;i++){
        dp[i] = 1;
        for(int j=p[i];j<i;j++){
            dp[i] = dp[i] + dp[j] +1;
            dp[i] %= mod;
        }
    }
    for(int i=1;i<=n;i++){
        ans = ans+dp[i]+1;
        ans %= mod;
    }
    cout<<ans<<endl;
    return 0;
}


#include <stdio.h>

#define MOD 1000000007

int main(void) {
    int i;
    int n, p[1000], dp[1000], sum[1001], ans;

    scanf("%d", &n);
    for (i = 0; i < n; i++)
        scanf("%d", p + i);

    sum[0] = 0;
    for (i = 0; i < n; i++) {
        dp[i] = (sum[i] - sum[p[i] - 1] + 2 + MOD) % MOD;
        sum[i + 1] = (sum[i] + dp[i]) % MOD;
    }

    ans = 0;
    for (i = 0; i < n; i++)
        ans = (ans + dp[i]) % MOD;

    printf("%d\n", ans);

    return 0;
}


/* ******
 * @ Codeforces Problem 407B. Long Path
 * @ author: ckmoonfish
 * @ Date: 2014.4.6
 * @ tag: dp, implementation
 * ******
*/

#include <stdio.h>
#include <string.h>

#define MAXN 1010
#define MD 1000000007

int main(){
    int i, n, cnt;
    int p[MAXN];
    int rc[MAXN];
    int ans[MAXN];
    memset(ans, 0, sizeof(ans));
    memset(rc, 0, sizeof(rc));
    rc[1] = 1;
    scanf("%d", &n);
    for(i = 1; i <= n; ++i)
        scanf("%d", p+i);

    ans[1] = 2;
    cnt =0;
    for(i = 2; i < n+1; ++i){
        ans[i] = ans[p[i]] + 2;
        int t = p[i] + 1;
        while(t < i){
            ans[i] += ans[t++];
            ans[i] %= MD;
        }
    }

    for(i = 1; i < n+1; ++i){
        cnt = ans[i] + cnt % MD;

    }
    printf("%d\n", cnt % MD);
    return 0;
}


/* ******
 * @ Codeforces Problem 407B. Long Path
 * @ author: ckmoonfish
 * @ Date: 2014.4.6
 * @ tag: dp, implementation
 * ******
*/

#include <stdio.h>
#include <string.h>

#define MAXN 1010
#define MD 1000000007

int main(){
    int i, n, cnt;
    int p[MAXN];
    int rc[MAXN];
    memset(rc, 0, sizeof(rc));
    rc[1] = 1;
    scanf("%d", &n);
    for(i = 1; i <= n; ++i)
        scanf("%d", p+i);
    i = 1;
    cnt = 1;
    while(i < n+1){
        rc[i]++;
        if(rc[i] % 2 == 0){
            ++i;
           // continue;
        } else {
            i = p[i];
        }
        cnt = (cnt + 1) % MD;
    }
    printf("%d\n", cnt);
    return 0;
}


#include<stdio.h>
#define m 1000000007u
typedef unsigned u;
u D[1111];
int main()
{
	u n,i,j;
	scanf("%u",&n);
	for(i=0;i++<n;)
	{
		scanf("%u",&j);
		D[i]=((D[i-1]+1)*2+m-D[j-1])%m;
	}
	printf("%u\n",D[n]);
	return 0;
}


#include<stdio.h>
#define mod 1000000007;

void solve(int p[],int n)
{
    int i,j;
    long long int dp[n+1];
    dp[0]=1;
    for(i=1;i<n;i++)
    {
        dp[i]=1;
        if(i==p[i]) dp[i]=1;
        for(j=p[i];j<i;j++)
        {
            dp[i]+=dp[j];
            dp[i]++;
            dp[i]%=mod;
        }
       // printf("dp[%d] %d\n",i,dp[i]);
    }
    dp[n]=0;
    for(i=0;i<n;i++)
    {
        dp[n]+=dp[i];
        dp[n]++;
        dp[n]%=mod;
    }
    printf("%lld\n",dp[n]);
}
int main()
{
    int n;
    scanf("%d",&n);
    int p[n],i;
    for(i=0;i<n;i++)
    {
        scanf("%d",&p[i]);
        p[i]--;
    }
    solve(p,n);
}


#include<stdio.h>
#define mod 1000000007;

void solve(int p[],int n)
{
    int i,j;
    long long int dp[n+1];
    dp[0]=1;
    for(i=1;i<n;i++)
    {
        dp[i]=1;
        if(i==p[i]) dp[i]=1;
        for(j=p[i];j<i;j++)
        {
            dp[i]+=dp[j];
            dp[i]++;
            dp[i]%=mod;
        }
       // printf("dp[%d] %d\n",i,dp[i]);
    }
    dp[n]=0;
    for(i=0;i<n;i++)
    {
        dp[n]+=dp[i];
        dp[n]++;
        dp[n]%=mod;
    }
    printf("%lld\n",dp[n]);
}
int main()
{
    int n;
    scanf("%d",&n);
    int p[n],i;
    for(i=0;i<n;i++)
    {
        scanf("%d",&p[i]);
        p[i]--;
    }
    solve(p,n);
    return 0;
}


#include<stdio.h>
#define MOD 1000000007

int dp[2][1003][2][1003];
long long int ans=0;
int p[1004];

long long int solve(int idx, int s1, int pos1, int s2, int pos2) {
  // int j;
  // for(j=0;j<idx;j++)printf(" ");
  // printf("%d: %d l%d %d %d\n",idx, s1, pos1, s2, pos2);
    if (pos2==pos1 && pos1==0) {
      return s1 ^ s2;
    }
    if (pos2 < 0)
        return 0;
    if (dp[s1][pos1][s2][pos2]!=0) return dp[s1][pos1][s2][pos2];

    if (s2==0){
      return dp[s1][pos1][0][pos2] = (solve(idx+1, 0, 0, 1, pos2-1) - solve(idx+1, 0, 0, s1, pos1) + 1)%MOD;
    } else {
      dp[s1][pos1][1][pos2] = (solve(idx+1, 0, 0, 1, pos2-1) - solve(idx+1, 0, 0, s1, pos1) + 2)%MOD;
      if (pos2!=p[pos2])
          dp[s1][pos1][1][pos2] += (solve(idx+1, 0, 0, 0, pos2) - solve(idx+1, 0, 0, 0, p[pos2]))%MOD;
      return dp[s1][pos1][1][pos2];
    }
}

int main(){

int n;scanf("%d", &n);
int i;
for(i=0;i<n;i++){scanf("%d", &p[i]); p[i]--;}

printf("%lld\n", solve(0, 0, 0, 0, n)%MOD);
// printf("%lld\n", solve(0, 0,0,1,1));

  return 0;
}


#include<stdio.h>
#define MOD 1000000007

int dp[2][1003][2][1003];
long long int ans=0;
int p[1004];

long long int solve(int idx, int s1, int pos1, int s2, int pos2) {
  // int j;
  // for(j=0;j<idx;j++)printf(" ");
  // printf("%d: %d l%d %d %d\n",idx, s1, pos1, s2, pos2);
    if (pos2==pos1 && pos1==0) {
      return s1 ^ s2;
    }
    if (pos2 < 0)
        return 0;
    if (dp[s1][pos1][s2][pos2]!=0) return dp[s1][pos1][s2][pos2];

    if (s2==0){
      return dp[s1][pos1][0][pos2] = (solve(idx+1, 0, 0, 1, pos2-1) - solve(idx+1, 0, 0, s1, pos1) + 1)%MOD;
    } else {
      dp[s1][pos1][1][pos2] = (solve(idx+1, 0, 0, 1, pos2-1) - solve(idx+1, 0, 0, s1, pos1) + 2)%MOD;
      if (pos2!=p[pos2])
          dp[s1][pos1][1][pos2] += (solve(idx+1, 0, 0, 0, pos2) - solve(idx+1, 0, 0, 0, p[pos2]))%MOD;
      return dp[s1][pos1][1][pos2] %= MOD;
    }
}

int main(){

int n;scanf("%d", &n);
int i;
for(i=0;i<n;i++){scanf("%d", &p[i]); p[i]--;}

printf("%lld\n", solve(0, 0, 0, 0, n)%MOD);
// printf("%lld\n", solve(0, 0,0,1,1));

  return 0;
}


#include<stdio.h>
#define MOD 1000000007

long long int dp[1003];
long long int ans=0;
int p[1004];

int main(){

  dp[0]=0;
  int n;scanf("%d", &n);
  int i;
  for(i=0;i<n;i++){scanf("%d", &p[i]); p[i]--;}
  for(int i=1;i<=n;i++){
    dp[i] = (((dp[i-1] + 2)%MOD + dp[i-1])%MOD + (MOD - dp[p[i-1]]))%MOD;
  }
  printf("%lld\n",dp[n]);

  return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <time.h>

void ucitaj(int *n,int **a,long **mat)
{
	scanf("%d",n);
	int i;
	*a=(int *)malloc(sizeof(int)*(*n+2));
	for(i=1;i<=*n;i++)
		scanf("%d",&(*a)[i]);
	*mat=(long *)calloc(sizeof(long),(*n+2));
}

void izracunaj(int n,int *a,int *mat)
{
	int tren,i,br=0;
	tren=1;
	int *broj=(int *)malloc(sizeof(int)*(n+2));
	for(i=1;i<=n+1;i++)
		broj[i]=-1;
	/*while(tren!=n+1)
	{
		mat[tren]++;
		if(mat[tren]&1) tren=a[tren];
		else tren++;
		br++;
	}*/
	while(tren!=n+1)
	{
		if(broj[tren]==-1) broj[tren]=br;
		mat[tren]++;
		if(mat[tren]&1) tren=a[tren];
		else tren++;
		br++;
	}
	for(i=1;i<=n+1;i++)
		printf("%d ",broj[i]);
	//printf("%d\n",br%1000000007);
}

void racun(int n,int *a, long *br)
{
	int i;
	for(i=2;i<=n+1;i++){
		br[i]=2+br[i-1]+(br[i-1]-br[a[i-1]]);
		if (br[i]<0) br[i]+=1000000007;
		br[i]=br[i]%1000000007;
		//printf("%d - %ld\n",i,br[i]);
	}

	printf("%ld\n",br[n+1]%1000000007);
}
int main()
{
	int n;
	int *a;
	long *mat;
	ucitaj(&n,&a,&mat);
	//izracunaj(n,a,mat);
	racun(n,a,mat);
	return 0;
}


#include <stdio.h>
#include <stdlib.h>
#include <time.h>

void ucitaj(int *n,int **a,long **mat)
{
	scanf("%d",n);
	int i;
	*a=(int *)malloc(sizeof(int)*(*n+2));
	for(i=1;i<=*n;i++)
		scanf("%d",&(*a)[i]);
	*mat=(long *)calloc(sizeof(long),(*n+2));
}

void racun(int n,int *a, long *br)
{
	int i;

	for(i=2;i<=n+1;i++){
		long pret=br[i-1]%1000000007;
		long pret2=br[a[i-1]]%1000000007;
		if(pret<pret2) pret+=1000000007;
		br[i]=2+pret+(pret-pret2);
		//printf("%d %ld\n",i,br[i]);
	}
	printf("%ld\n",br[n+1]%1000000007);
}
int main()
{
	int n;
	int *a;
	long *mat;
	ucitaj(&n,&a,&mat);
	//izracunaj(n,a,mat);
	racun(n,a,mat);
	return 0;
}


#include <stdio.h>
#include <stdlib.h>

#define MODUL 1000000007

int main() {
	int n, *p, *opt, i, j;

	scanf("%d",&n);
	p = (int *)malloc((n+1)*sizeof(int));
	opt = (int *)malloc((n+2)*sizeof(int));

	for (i=1; i<=n; i++) {
		scanf("%d", &p[i]);
	}

	opt[1] = 0;
	opt[2] = 2;

	for (i=3; i<=n+1; i++) {
		opt[i] = (2*opt[i-1] - opt[p[i-1]] + 2) % MODUL;
	}

	printf("%d\n", opt[n+1]);

	return 0;
}


#include <stdio.h>
#include <stdlib.h>

int main(){
    int n,i;
    int *p;
    int *portali;

    scanf("%d",&n);

    p=(int *)malloc((n+1)*sizeof(int));
    portali=(int *)calloc(n+2,sizeof(int));

    for(i=1;i<n+1;i++)
        scanf("%d",&p[i]);

    portali[1]=0;
    portali[2]=2;

    for(i=3;i<n+2;i++){
        portali[i]=2+2*(portali[i-1]%1000000007)-portali[p[i-1]]%1000000007;
        if (portali[i]<0) portali[i]+=1000000007;
    }

    printf("%d",portali[n+1]%1000000007);
}


#include <stdio.h>
#include <stdlib.h>

int main(){
    int n,i;
    int *p;
    int *portali;

    scanf("%d",&n);

    p=(int *)malloc((n+1)*sizeof(int));
    portali=(int *)calloc(n+2,sizeof(int));

    for(i=1;i<n+1;i++)
        scanf("%d",&p[i]);

    portali[1]=0;
    portali[2]=2;

    for(i=3;i<n+2;i++){
        portali[i]=2+2*(portali[i-1]%1000000007)-portali[p[i-1]]%1000000007;
    }

    printf("%d",portali[n+1]%1000000007);
}


#include <stdio.h>
#include <stdlib.h>

int main(){
    int n,i,j,*portali;
    int *p;
    scanf("%d",&n);

    p=(int *)malloc((n+1)*sizeof(int));
    portali=(int *)calloc(n+2,sizeof(int));

    for(i=1;i<n+1;i++)
        scanf("%d",&p[i]);

    i=3;
    portali[1]=0;
    portali[2]=2;

    for(i=3;i<n+2;i++){
        portali[i]=2+portali[i-1]+portali[i-1]-portali[p[i-1]];
    }

    printf("%d",portali[n+1]%1000000007);
}


#include <stdio.h>
#include <stdlib.h>
#include <time.h>

void ucitaj(int *n,int **a,long **mat)
{
	scanf("%d",n);
	int i;
	*a=(int *)malloc(sizeof(int)*(*n+2));
	for(i=1;i<=*n;i++)
		scanf("%d",&(*a)[i]);
	*mat=(long *)calloc(sizeof(long),(*n+2));
}

void izracunaj(int n,int *a,int *mat)
{
	int tren,i,br=0;
	tren=1;
	int *broj=(int *)malloc(sizeof(int)*(n+2));
	for(i=1;i<=n+1;i++)
		broj[i]=-1;
	/*while(tren!=n+1)
	{
		mat[tren]++;
		if(mat[tren]&1) tren=a[tren];
		else tren++;
		br++;
	}*/
	while(tren!=n+1)
	{
		if(broj[tren]==-1) broj[tren]=br;
		mat[tren]++;
		if(mat[tren]&1) tren=a[tren];
		else tren++;
		br++;
	}
	for(i=1;i<=n+1;i++)
		printf("%d ",broj[i]);
	//printf("%d\n",br%1000000007);
}

void racun(int n,int *a, long *br)
{
	int i;
	for(i=2;i<=n+1;i++){
		br[i]=2+br[i-1]+(br[i-1]-br[a[i-1]]);
		br[i]=br[i]%1000000007;
		//printf("%d - %ld\n",i,br[i]);
	}
	printf("%ld\n",br[n+1]%1000000007);
}
int main()
{
	int n;
	int *a;
	long *mat;
	ucitaj(&n,&a,&mat);
	//izracunaj(n,a,mat);
	racun(n,a,mat);
	return 0;
}


#include <stdio.h>
#include <stdlib.h>

void ucitaj(int *n,int **a,long **mat)
{
	scanf("%d",n);
	int i;
	*a=(int *)malloc(sizeof(int)*(*n+2));
	for(i=1;i<=*n;i++)
		scanf("%d",&(*a)[i]);
	*mat=(long *)calloc(sizeof(long),(*n+2));
}

void racun(int n,int *a, long *br)
{
	int i;

	for(i=2;i<=n+1;i++){
		long pret=br[i-1]%1000000007;
		long pret2=br[a[i-1]]%1000000007;
		if(pret<pret2) pret+=1000000007;
		br[i]=(2+pret+(pret-pret2))%1000000007;
		//printf("%d %ld\n",i,br[i]);
	}
	printf("%ld\n",br[n+1]%1000000007);
}
int main()
{
	int n;
	int *a;
	long *mat;
	ucitaj(&n,&a,&mat);
	racun(n,a,mat);
	return 0;
}


#include <stdio.h>
#include <stdlib.h>

#define MODUL 1000000007

int main() {
	int n, *p, *opt, i;

	scanf("%d",&n);
	p = (int *)malloc((n+1)*sizeof(int));
	opt = (int *)malloc((n+2)*sizeof(int));

	for (i=1; i<=n; i++) {
		scanf("%d", &p[i]);
	}

	opt[1] = 0;
	opt[2] = 2;

	for (i=3; i<=n+1; i++) {
		opt[i] = (2*opt[i-1] - opt[p[i-1]] + 2) % MODUL;
		if (opt[i]<0) {
			opt[i] += MODUL;
		}
	}

	printf("%d\n", opt[n+1]);

	return 0;
}


#include<stdio.h>
long long dp[1050][2],tot;int cross[1050];
long long no=1000000007;
main()
{
    int n,i;
    scanf("%d",&n);
    int p[n+1];
    for(i=1;i<=n;i++)
        scanf("%d",&p[i]);
    for(i=1;i<=n;i++)
        dp[i][0]=dp[i][1]=-1;
int pos=1,prev_pos=0;
while(pos!=n+1)
{
    if(dp[pos][cross[pos]]>-1)
    {
       tot=(2*tot-1-dp[pos][cross[pos]]+no)%no;
        pos=prev_pos;
    }
    else
    {
        dp[pos][cross[pos]]=tot;
        prev_pos=pos;
        if(!cross[pos])
             pos=p[pos];
        else
            pos=pos+1;
        cross[prev_pos]=!cross[prev_pos];
        tot=(tot+1)%no;
    }
}
printf("%I64d",tot);
    return 0;
}


#include <stdio.h>
#include <string.h>

#define MAXN 1010
#define MD 1000000007

int main(){
    int i, n, cnt;
    int p[MAXN];
    int ans[MAXN];
    memset(ans, 0, sizeof(ans));
    scanf("%d", &n);
    for(i = 1; i <= n; ++i)
        scanf("%d", p+i);

    ans[1] = 2;
    cnt =0;
    for(i = 2; i < n+1; ++i){
        ans[i] = ans[p[i]] + 2;
        int t = p[i] + 1;
        while(t < i){
            ans[i] += ans[t++];
            ans[i] %= MD;
        }
    }

    for(i = 1; i < n+1; ++i){
        cnt = ans[i] + cnt % MD;

    }
    printf("%d\n", cnt % MD);
    return 0;
}


#include <stdio.h>
#include <stdlib.h>

#define MODUL 1000000007

int n;
int *p;
int *opt;

int main() {
	int i;

	scanf("%d",&n);

	p = (int*)malloc((n+2)*sizeof(int));
	opt = (int*)malloc((n+2)*sizeof(int));

	for (i=1;i<=n;i++) {
		scanf("%d",&p[i]);
	}

	opt[1] = 0;
	opt[2] = 2;

	for (i=3;i<=n+1;i++) {
		opt[i] = (2*opt[i-1]-opt[p[i-1]]+2)%MODUL;

		if (opt[i]<0)
			opt[i]+=MODUL;
	}

	printf("%d\n",opt[n+1]);
}


/* Dodatna 01 - Zadatak02 - za 10 */

#include <stdio.h>
#include <stdlib.h>

int *krstici;
int *p;
int n;

int main() {
	scanf("%d",&n);

	int ukupno = 0;

	krstici = (int*)malloc((n+1)*sizeof(int));
	p = (int*)malloc((n+1)*sizeof(int));

	int i;

	for (i=1;i<=n;i++) {
		krstici[i] = 0;
		scanf("%d",&p[i]);
	}

	i = 1;

	while (i < n + 1) {
		krstici[i]++;
		ukupno++;
		if (krstici[i]%2 == 1) {
			i = p[i];
		}
		else {
			i = i+1;
		}
	}

	printf("%d\n",ukupno);

	return 0;
}


import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.InputMismatchException;

public class LongPath {
	static class Solver {

		int N, p[], exit[];
		int add(int a, int b) { return (a + b) % 1_000_000_007; }

		void solve(int testNumber, FastScanner s, PrintWriter out) {
			N = s.nextInt(); p = new int[N]; exit = new int[N];
			for(int i = 0; i < N; i++) p[i] = s.nextInt() - 1;

			Arrays.fill(exit, 2);
			int res = 2;
			for(int i = 1; i < N; i++) {
				int j = p[i];
				while(j < i) exit[i] = add(exit[i], exit[j++]);
				res = add(res, exit[i]);
			}
			out.println(res);
		}

	}

	final static boolean cases = false;

	public static void main(String[] args) {

		FastScanner s = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		Solver solver = new Solver();
		for (int t = 1, T = cases ? s.nextInt() : 1; t <= T; t++)
			solver.solve(t, s, out);

		out.close();

	}

	static int min(int a, int b) {
		return a < b ? a : b;
	}

	static int max(int a, int b) {
		return a > b ? a : b;
	}

	static long min(long a, long b) {
		return a < b ? a : b;
	}

	static long max(long a, long b) {
		return a > b ? a : b;
	}

	static int swap(int a, int b) {
		return a;
	}

	static Object swap(Object a, Object b) {
		return a;
	}

	static String ts(Object... o) {
		return Arrays.deepToString(o);
	}

	static class FastScanner {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public FastScanner(InputStream stream) {
			this.stream = stream;
		}

		public FastScanner(File f) throws FileNotFoundException {
			this(new FileInputStream(f));
		}

		public FastScanner(String s) {
			this.stream = new ByteArrayInputStream(s.getBytes(StandardCharsets.UTF_8));
		}

		int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		boolean isEndline(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String next() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = read();
			while (isEndline(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndline(c));
			return res.toString();
		}

		// Jacob Garbage

		public int[] nextIntArray(int N) {
			int[] ret = new int[N];
			for (int i = 0; i < N; i++)
				ret[i] = this.nextInt();
			return ret;
		}

		public int[][] next2DIntArray(int N, int M) {
			int[][] ret = new int[N][];
			for (int i = 0; i < N; i++)
				ret[i] = this.nextIntArray(M);
			return ret;
		}

		public long[] nextLongArray(int N) {
			long[] ret = new long[N];
			for (int i = 0; i < N; i++)
				ret[i] = this.nextLong();
			return ret;
		}

		public long[][] next2DLongArray(int N, int M) {
			long[][] ret = new long[N][];
			for (int i = 0; i < N; i++)
				ret[i] = nextLongArray(M);
			return ret;
		}

		public double[] nextDoubleArray(int N) {
			double[] ret = new double[N];
			for (int i = 0; i < N; i++)
				ret[i] = this.nextDouble();
			return ret;
		}

		public double[][] next2DDoubleArray(int N, int M) {
			double[][] ret = new double[N][];
			for (int i = 0; i < N; i++)
				ret[i] = this.nextDoubleArray(M);
			return ret;
		}

	}
}


import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class LongPath {
	static int mod = 1000000007;

	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[10005]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		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 void main(String[] args) throws IOException {
		Reader in = new Reader();
		int i, m = 0, n;
		n = in.nextInt();
		int p[] = new int[n + 1];
		for (i = 1; i <= n; i++) {
			p[i] = in.nextInt();
		}
		int[] cross = new int[1005];
		i = 1;
		while (i != n + 1) {
//			System.out.println(i);
			cross[i]++;
			if ((cross[i] & 1) == 0) {
				i = i + 1;
			} else {
				i = p[i];
			}
			m = (m + 1) % mod;
		}
		StringBuilder ans = new StringBuilder();

		System.out.println(m);
	}
}


import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class LongPath {
	static int mod = 1000000007;

	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[10005]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		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 void main(String[] args) throws IOException {
		Reader in = new Reader();
		int i, m = 0, n, j, k;
		n = in.nextInt();
		int p[] = new int[n + 1];
		for (i = 1; i <= n; i++) {
			p[i] = in.nextInt();
		}
		int dp[] = new int[n + 1];
		for (i = 1; i < n + 1; i++) {
			dp[i] = 2;
			for (j = p[i]; j < i; j++) {
				dp[i] += dp[j];
				if (dp[i] >= mod)
					dp[i] -= mod;
			}
		}
		for (i = 1; i < n + 1; i++) {
			m += dp[i];
			if (m >= mod)
				m -= mod;
		}
		System.out.println(m);
	}
}


import java.util.*;

public class Portal {

	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		int r = in.nextInt();

		int[] portals = new int[r];
		int[] rooms = new int[r];

		for (int i = 0; i < r; i++) {
			portals[i] = in.nextInt();
		}

		int count = 0;
		for (int i = 0; i < r; i++) {
			for (int j = portals[i]; j < i; j++) {
				count += rooms[j];
			}
			count += 2;
			rooms[i] = count;
		}

		int bob = 0;
		for (int i = 0; i < r; i++) {
			bob += rooms[i];
		}
		System.out.println(bob);
	}
}