#include <iostream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <sstream>
#include <algorithm>
#include <functional>
#include <numeric>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

using namespace std;
int main(){
	int n, w;
	int a;
	long long t = 0, maxt = 0;
	cin>>n>> w;
	for(int i=0; i<n ;i++) {
		cin>>a;
		t += a;
		if(t>maxt) maxt = t;

	}

	long long ans = 0;

	if(w>=maxt){
		ans = w-maxt+1;
//		if(maxt > 0) ans++;
	}

	cout<<ans;

	return 0;
}


#include <iostream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <sstream>
#include <algorithm>
#include <functional>
#include <numeric>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

using namespace std;
int main(){
	int n, w;
	int a;
	int t = 0, maxt = 0;
	cin>>n>> w;
	for(int i=0; i<n ;i++) {
		cin>>a;
		t += a;
		if(t>maxt) maxt = t;

	}

	int ans = 0;

	if(w>maxt) ans = w-maxt;

	if(maxt != 0) ans++;

	cout<<ans;

	return 0;
}


#include <iostream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <sstream>
#include <algorithm>
#include <functional>
#include <numeric>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

using namespace std;
int main(){
	int n, w;
	int a;
	long long t = 0, maxt = 0, mint=0;
	cin>>n>> w;
	for(int i=0; i<n ;i++) {
		cin>>a;
		t += a;
		if(t>maxt) maxt = t;
		if(t<mint) mint = t;

	}

	long long ans = 0;

	if(w>=maxt){
		ans = w-maxt+1+mint;
//		if(maxt > 0) ans++;
		if(ans<0) ans = 0;
	}

	cout<<ans;

	return 0;
}


#include<bits/stdc++.h>

using namespace std;

int main(){

    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cout.precision(20);

    int n, w, a, _min = 0x7fffffff, sum = 0, _max = 0x80000000;
    cin >> n >> w;
    while(n--){
        cin >> a;
        sum += a;
        _min = min(_min, sum);
        _max = max(_max, sum);
    }
    if(_max > w){
        cout << "0\n";
        return 0;
    }

    int min_p = 0, max_p;
    if(_min < 0 )
        min_p = -_min;
    if(_max < 0 ){
        max_p = w;
    }else max_p = w-_max;

    if(min_p > max_p)
        cout << "0\n";
    else cout << max_p - min_p + 1 << '\n';

}


#include<bits/stdc++.h>

using namespace std;

int main(){

    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cout.precision(20);

    int n, w, a, _min = 0x7fffffff, sum = 0, _max = 0x80000000;
    cin >> n >> w;
    while(n--){
        cin >> a;
        sum += a;
        _min = min(_min, sum);
        _max = max(_max, sum);
    }
    int start = 0;
    if(_min < 0) start = -_min;
    if(_max+start > w){
        cout << "0\n";
    }else{
        cout << w - _max - start + 1 << '\n';
    }

}


#include<bits/stdc++.h>

using namespace std;

#define MAX 10e7

int n;

int solve(vector<int>v){
    int d = v[1]-v[0], cnt = 0, di;
    for(int i = 1; i < n; i++){
        di = v[i]-v[i-1];
        if(di == d)
            continue;
        else if(di == d+1){
            v[i]--;
            cnt++;
        }
        else if(di == d-1){
            v[i]++;
            cnt++;
        }
        else{
            cnt = MAX;
            break;
        }
    }
    return cnt;
}

int main(){

    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cout.precision(20);

    int n, w, a, _min = 10e9, sum, _max = -10e9;
    cin >> n >> w;
    while(n--){
        cin >> a;
        sum += a;
        _min = min(_min, sum);
        _max = max(_max, sum);
    }
    int start = 0;
    if(_min < 0) start = -_min;
    if(_max+start > w){
        cout << "0\n";
    }else{
        cout << w - _max - start + 1 << '\n';
    }

}


#include<bits/stdc++.h>

using namespace std;

int main(){

    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cout.precision(20);

    int n, w, a, _min = 0x7fffffff, sum = 0, _max = 0x80000000;
    cin >> n >> w;
    while(n--){
        cin >> a;
        sum += a;
        _min = min(_min, sum);
        _max = max(_max, sum);
    }
    int start = 0;
    if(_min < 0) start = -_min;
    if(_max+start > w or start>w){
        cout << "0\n";
    }else{
        cout << w - _max - start + 1 << '\n';
    }

}


#include<bits/stdc++.h>

using namespace std;

#define MAX 10e7

int n;

int solve(vector<int>v){
    int d = v[1]-v[0], cnt = 0, di;
    for(int i = 1; i < n; i++){
        di = v[i]-v[i-1];
        if(di == d)
            continue;
        else if(di == d+1){
            v[i]--;
            cnt++;
        }
        else if(di == d-1){
            v[i]++;
            cnt++;
        }
        else{
            cnt = MAX;
            break;
        }
    }
    return cnt;
}

int main(){

    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cout.precision(20);

    int n, w, a, _min = 0x7fffffff, sum, _max = 0x80000000;
    cin >> n >> w;
    while(n--){
        cin >> a;
        sum += a;
        _min = min(_min, sum);
        _max = max(_max, sum);
    }
    int start = 0;
    if(_min < 0) start = -_min;
    if(_max+start > w){
        cout << "0\n";
    }else{
        cout << w - _max - start + 1 << '\n';
    }

}


#include<bits/stdc++.h>

using namespace std;

int main(){

    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cout.precision(20);

    int n, w, a, _min = 0x7fffffff, sum = 0, _max = 0x80000000;
    cin >> n >> w;
    while(n--){
        cin >> a;
        sum += a;
        _min = min(_min, sum);
        _max = max(_max, sum);
    }
    if(_max > w){
        cout << "0\n";
    }

    int min_p = 0, max_p;
    if(_min < 0 )
        min_p = -_min;
    if(_max < 0 ){
        max_p = w;
    }else max_p = w-_max;

    if(min_p > max_p)
        cout << "0\n";
    else cout << max_p - min_p + 1 << '\n';

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<cmath>
#include<string>
//#include <bits/stdc++.h>
#include<map>
#include <sstream>
#include<ctime>
using namespace std;
#define ll long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
//#define rep(i,n) for(long long int i = 0; i < n; ++i)
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mod 998244353
#define mul(x,y) ((ll)(x)*(y))%mod
#define viter vector<long long int>::iterator
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define INF 0x3f3f3f3f
const ll P=1000000000+7;
//vvi adj;
//vi a;
//vi  b;
//vi c;vi sol;
//vi visit;
//ll C[5005][5005];
ll MOD(ll a, ll b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
long long int max3(long long int a,long long int b, long long int c)
{
    return max(c,max(a,b));
}
ll power(ll x,ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
ll logg(ll a)
{
    ll x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
long long int binarySearch(vi arr, long long int l, long long int r, ll x)
{
    if (r >= l)
    {
        long long int mid = l + (r - l)/2;
        if (arr[mid] == x)
            return mid;
        if (arr[mid] > x)
            return binarySearch(arr, l, mid-1, x);
        return binarySearch(arr, mid+1, r, x);
    }
    return -1;
}
long long int mins(ll a,ll b)
{
    if(a<b)
    {
        return a;
    }
    return b;
}
int main()
{
    ll n,w;
    cin>>n>>w;
    vector<ll> a(n);
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
    }
    vector<ll> ac(n);
    ac[0]=a[0];
    for(ll i=1;i<n;i++)
    {
        ac[i]=ac[i-1]+a[i];
    }
    sort(all(ac));
    ll min=ac[0];ll max=ac[n-1];
    if(min>w||max>w||min<-1*w||max<-1*w)
    {
        cout<<0;
        return 0;
    }
    if(max<0)
    {
        max=0;
    }

    min=mins(min,0);
    ll ans=w-max+min+1;
    if(-1*min>w||min>w)
    {
        cout<<0;
    }
    else
    {
        if(max>w)
        {
            cout<<0;
        }
        else
        {
            cout<<ans;
        }
    }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<cmath>
#include<string>
//#include <bits/stdc++.h>
#include<map>
#include <sstream>
#include<ctime>
using namespace std;
#define ll long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
//#define rep(i,n) for(long long int i = 0; i < n; ++i)
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mod 998244353
#define mul(x,y) ((ll)(x)*(y))%mod
#define viter vector<long long int>::iterator
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define INF 0x3f3f3f3f
const ll P=1000000000+7;
//vvi adj;
//vi a;
//vi  b;
//vi c;vi sol;
//vi visit;
//ll C[5005][5005];
ll MOD(ll a, ll b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
long long int max3(long long int a,long long int b, long long int c)
{
    return max(c,max(a,b));
}
ll power(ll x,ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
ll logg(ll a)
{
    ll x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
long long int binarySearch(vi arr, long long int l, long long int r, ll x)
{
    if (r >= l)
    {
        long long int mid = l + (r - l)/2;
        if (arr[mid] == x)
            return mid;
        if (arr[mid] > x)
            return binarySearch(arr, l, mid-1, x);
        return binarySearch(arr, mid+1, r, x);
    }
    return -1;
}
long long int mins(ll a,ll b)
{
    if(a<b)
    {
        return a;
    }
    return b;
}
int main()
{
    ll n,w;
    cin>>n>>w;
    vector<ll> a(n);
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
    }
    vector<ll> ac(n);
    ac[0]=a[0];
    for(ll i=1;i<n;i++)
    {
        ac[i]=ac[i-1]+a[i];
    }
    sort(all(ac));
    ll min=ac[0];ll max=ac[n-1];
    if(min>w)
    {
        cout<<0;
        return 0;
    }
    min=mins(min,0);
    ll ans=w-max+min+1;
    if(-1*min>w||min>w)
    {
        cout<<0;
    }
    else
    {
        if(max>w)
        {
            cout<<0;
        }
        else
        {
            cout<<ans;
        }
    }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<cmath>
#include<string>
//#include <bits/stdc++.h>
#include<map>
#include <sstream>
#include<ctime>
using namespace std;
#define ll long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
//#define rep(i,n) for(long long int i = 0; i < n; ++i)
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mod 998244353
#define mul(x,y) ((ll)(x)*(y))%mod
#define viter vector<long long int>::iterator
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define INF 0x3f3f3f3f
const ll P=1000000000+7;
//vvi adj;
//vi a;
//vi  b;
//vi c;vi sol;
//vi visit;
//ll C[5005][5005];
ll MOD(ll a, ll b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
long long int max3(long long int a,long long int b, long long int c)
{
    return max(c,max(a,b));
}
ll power(ll x,ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
ll logg(ll a)
{
    ll x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
long long int binarySearch(vi arr, long long int l, long long int r, ll x)
{
    if (r >= l)
    {
        long long int mid = l + (r - l)/2;
        if (arr[mid] == x)
            return mid;
        if (arr[mid] > x)
            return binarySearch(arr, l, mid-1, x);
        return binarySearch(arr, mid+1, r, x);
    }
    return -1;
}
long long int mins(ll a,ll b)
{
    if(a<b)
    {
        return a;
    }
    return b;
}
int main()
{
    ll n,w;
    cin>>n>>w;
    vector<ll> a(n);
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
    }
    vector<ll> ac(n);
    ac[0]=a[0];
    for(ll i=1;i<n;i++)
    {
        ac[i]=ac[i-1]+a[i];
    }
    sort(all(ac));
    ll min=ac[0];ll max=ac[n-1];
    if(min>w||max>w||min<-1*w||max<-1*w)
    {
        cout<<0;
        return 0;
    }
    max=mins(w,w-max);
    min=mins(min,0);
    ll ans=w-max+min+1;
    if(-1*min>w||min>w)
    {
        cout<<0;
    }
    else
    {
        if(max>w)
        {
            cout<<0;
        }
        else
        {
            cout<<ans;
        }
    }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<cmath>
#include<string>
//#include <bits/stdc++.h>
#include<map>
#include <sstream>
#include<ctime>
using namespace std;
#define ll long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
//#define rep(i,n) for(long long int i = 0; i < n; ++i)
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mod 998244353
#define mul(x,y) ((ll)(x)*(y))%mod
#define viter vector<long long int>::iterator
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define INF 0x3f3f3f3f
const ll P=1000000000+7;
//vvi adj;
//vi a;
//vi  b;
//vi c;vi sol;
//vi visit;
//ll C[5005][5005];
ll MOD(ll a, ll b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
long long int max3(long long int a,long long int b, long long int c)
{
    return max(c,max(a,b));
}
ll power(ll x,ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
ll logg(ll a)
{
    ll x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
long long int binarySearch(vi arr, long long int l, long long int r, ll x)
{
    if (r >= l)
    {
        long long int mid = l + (r - l)/2;
        if (arr[mid] == x)
            return mid;
        if (arr[mid] > x)
            return binarySearch(arr, l, mid-1, x);
        return binarySearch(arr, mid+1, r, x);
    }
    return -1;
}
long long int mins(ll a,ll b)
{
    if(a<b)
    {
        return a;
    }
    return b;
}
int main()
{
    ll n,w;
    cin>>n>>w;
    vector<ll> a(n);
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
    }
    vector<ll> ac(n);
    ac[0]=a[0];
    for(ll i=1;i<n;i++)
    {
        ac[i]=ac[i-1]+a[i];
    }
    sort(all(ac));
    ll min=ac[0];ll max=ac[n-1];
    if(min>w||max>w||min<-1*w||max<-1*w)
    {
        cout<<0;
        return 0;
    }
    min=mins(min,0);
    ll ans=w-max+min+1;
    if(-1*min>w||min>w)
    {
        cout<<0;
    }
    else
    {
        if(max>w)
        {
            cout<<0;
        }
        else
        {
            cout<<ans;
        }
    }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<cmath>
#include<string>
//#include <bits/stdc++.h>
#include<map>
#include <sstream>
#include<ctime>
using namespace std;
#define ll long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
//#define rep(i,n) for(long long int i = 0; i < n; ++i)
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mod 998244353
#define mul(x,y) ((ll)(x)*(y))%mod
#define viter vector<long long int>::iterator
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define INF 0x3f3f3f3f
const ll P=1000000000+7;
//vvi adj;
//vi a;
//vi  b;
//vi c;vi sol;
//vi visit;
//ll C[5005][5005];
ll MOD(ll a, ll b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
long long int max3(long long int a,long long int b, long long int c)
{
    return max(c,max(a,b));
}
ll power(ll x,ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
ll logg(ll a)
{
    ll x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
long long int binarySearch(vi arr, long long int l, long long int r, ll x)
{
    if (r >= l)
    {
        long long int mid = l + (r - l)/2;
        if (arr[mid] == x)
            return mid;
        if (arr[mid] > x)
            return binarySearch(arr, l, mid-1, x);
        return binarySearch(arr, mid+1, r, x);
    }
    return -1;
}
long long int mins(ll a,ll b)
{
    if(a<b)
    {
        return a;
    }
    return b;
}
int main()
{
    ll n,w;
    cin>>n>>w;
    vi a(n);
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
    }
    vector<ll> ac(n);
    ac[0]=a[0];
    for(ll i=1;i<n;i++)
    {
        ac[i]=ac[i-1]+a[i];
    }
    sort(all(ac));
    ll min=ac[0];ll max=ac[n-1];
    min=mins(min,0);
    ll ans=w-max+min+1;
    if(-1*min>w)
    {
        cout<<0;
    }
    else
    {
        if(max>w)
        {
            cout<<0;
        }
        else
        {
            cout<<ans;
        }
    }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<cmath>
#include<string>
//#include <bits/stdc++.h>
#include<map>
#include <sstream>
#include<ctime>
using namespace std;
#define ll long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
//#define rep(i,n) for(long long int i = 0; i < n; ++i)
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mod 998244353
#define mul(x,y) ((ll)(x)*(y))%mod
#define viter vector<long long int>::iterator
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define INF 0x3f3f3f3f
const ll P=1000000000+7;
//vvi adj;
//vi a;
//vi  b;
//vi c;vi sol;
//vi visit;
//ll C[5005][5005];
ll MOD(ll a, ll b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
long long int max3(long long int a,long long int b, long long int c)
{
    return max(c,max(a,b));
}
ll power(ll x,ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
ll logg(ll a)
{
    ll x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
long long int binarySearch(vi arr, long long int l, long long int r, ll x)
{
    if (r >= l)
    {
        long long int mid = l + (r - l)/2;
        if (arr[mid] == x)
            return mid;
        if (arr[mid] > x)
            return binarySearch(arr, l, mid-1, x);
        return binarySearch(arr, mid+1, r, x);
    }
    return -1;
}
long long int mins(ll a,ll b)
{
    if(a<b)
    {
        return a;
    }
    return b;
}
int main()
{
    ll n,w;
    cin>>n>>w;
    vi a(n);
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
    }
    vector<ll> ac(n);
    ac[0]=a[0];
    for(ll i=1;i<n;i++)
    {
        ac[i]=ac[i-1]+a[i];
    }
    sort(all(ac));
    ll min=ac[0];ll max=ac[n-1];
    min=mins(min,0);
    ll ans=w-max+min+1;
    if(-1*min>w||min>w)
    {
        cout<<0;
    }
    else
    {
        if(max>w)
        {
            cout<<0;
        }
        else
        {
            cout<<ans;
        }
    }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<cmath>
#include<string>
//#include <bits/stdc++.h>
#include<map>
#include <sstream>
#include<ctime>
using namespace std;
#define ll long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
//#define rep(i,n) for(long long int i = 0; i < n; ++i)
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mod 998244353
#define mul(x,y) ((ll)(x)*(y))%mod
#define viter vector<long long int>::iterator
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define INF 0x3f3f3f3f
const ll P=1000000000+7;
//vvi adj;
//vi a;
//vi  b;
//vi c;vi sol;
//vi visit;
//ll C[5005][5005];
ll MOD(ll a, ll b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
long long int max3(long long int a,long long int b, long long int c)
{
    return max(c,max(a,b));
}
ll power(ll x,ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
ll logg(ll a)
{
    ll x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
long long int binarySearch(vi arr, long long int l, long long int r, ll x)
{
    if (r >= l)
    {
        long long int mid = l + (r - l)/2;
        if (arr[mid] == x)
            return mid;
        if (arr[mid] > x)
            return binarySearch(arr, l, mid-1, x);
        return binarySearch(arr, mid+1, r, x);
    }
    return -1;
}
long long int mins(ll a,ll b)
{
    if(a<b)
    {
        return a;
    }
    return b;
}
int main()
{
    ll n,w;
    cin>>n>>w;
    vector<ll> a(n);
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
    }
    vector<ll> ac(n);
    ac[0]=a[0];
    for(ll i=1;i<n;i++)
    {
        ac[i]=ac[i-1]+a[i];
    }
    sort(all(ac));
    ll min=ac[0];ll max=ac[n-1];
    if(max<0)
    {
        max=0;
    }
    if(min>0)
    {
        min=0;
    }
    ll ans=w-max+min+1;
    if(-1*min>w||min>w)
    {
        cout<<0;
    }
    else
    {
        if(max>w)
        {
            cout<<0;
        }
        else
        {
            if(ans<0)
            {
                cout<<0;
            }
            else
            {
                cout<<ans;
            }
        }
    }

}


#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<cmath>
#include<string>
//#include <bits/stdc++.h>
#include<map>
#include <sstream>
#include<ctime>
using namespace std;
#define ll long long int
#define ld long double
#define key pair<ld,ld>
#define ii pair<int,int>
#define si set<int>
#define vii vector<pair<int,int> >
#define vi vector<int>
#define vll vector<ll>
#define vb vector<bool>
#define vvi vector<vector<int> >
#define vs vector<string>
#define all(v) v.begin(),v.end()
//#define rep(i,n) for(long long int i = 0; i < n; ++i)
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define nu 100001
#define mod 998244353
#define mul(x,y) ((ll)(x)*(y))%mod
#define viter vector<long long int>::iterator
#define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define INF 0x3f3f3f3f
const ll P=1000000000+7;
//vvi adj;
//vi a;
//vi  b;
//vi c;vi sol;
//vi visit;
//ll C[5005][5005];
ll MOD(ll a, ll b)
{
    if(a>b)
        return a-b;
    else
        return b-a;
}
long long int max3(long long int a,long long int b, long long int c)
{
    return max(c,max(a,b));
}
ll power(ll x,ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
ll logg(ll a)
{
    ll x=0;
    while(a>1)
    {
        x++;
        a/=2;
    }
    return x;
}
long long int binarySearch(vi arr, long long int l, long long int r, ll x)
{
    if (r >= l)
    {
        long long int mid = l + (r - l)/2;
        if (arr[mid] == x)
            return mid;
        if (arr[mid] > x)
            return binarySearch(arr, l, mid-1, x);
        return binarySearch(arr, mid+1, r, x);
    }
    return -1;
}
long long int mins(ll a,ll b)
{
    if(a<b)
    {
        return a;
    }
    return b;
}
int main()
{
    ll n,w;
    cin>>n>>w;
    vector<ll> a(n);
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
    }
    vector<ll> ac(n);
    ac[0]=a[0];
    for(ll i=1;i<n;i++)
    {
        ac[i]=ac[i-1]+a[i];
    }
    sort(all(ac));
    ll min=ac[0];ll max=ac[n-1];
    if(max<0)
    {
        max=0;
    }
    if(min>0)
    {
        min=0;
    }
    ll ans=w-max+min+1;
    if(-1*min>w||min>w)
    {
        cout<<0;
    }
    else
    {
        if(max>w)
        {
            cout<<0;
        }
        else
        {
            cout<<ans;
        }
    }

}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007

int main()
{
    ll n, w;
    cin>>n>>w;
    ll a[n+1]={0}, maxm=a[0], minm=0;
    for(ll i=1; i<=n; i++)
    {
        ll k; cin>>k;
        a[i]=a[i-1]+k;
        if(a[i]>maxm)
            maxm=a[i];
        if(a[i]<minm)
            minm=a[i];
        if(k>w || maxm>w || minm<-w)
            {
                cout<<0; return 0;
            }
    }
    cout<<w-maxm+minm+1>0?w-maxm+minm+1:0;
    return 0;
}


#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
#define ll long long int
#define mod 1000000007

int main()
{
   ll n, w;
    cin>>n>>w;
    ll a[n+1]={0}, maxm=a[0], minm=0;
    for(ll i=1; i<=n; i++)
    {
        ll k; cin>>k;
        a[i]=a[i-1]+k;
        if(a[i]>maxm)
            maxm=a[i];
        if(a[i]<minm)
            minm=a[i];
    }
    if(w+minm-maxm+1>=0)
    {
        cout<<w+minm-maxm+1; return 0;
    }
    else
        cout<<0;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007

int main()
{
    ll n, w;
    cin>>n>>w;
    ll a[n+1]={0}, maxm=a[0], minm=0;
    for(ll i=1; i<=n; i++)
    {
        ll k; cin>>k;
        a[i]=a[i-1]+k;
        if(a[i]>maxm)
            maxm=a[i];
        if(a[i]<minm)
            minm=a[i];
        if(k>w || maxm>w || minm<-w)
            {
                cout<<0; return 0;
            }
    }
    cout<<w-maxm+minm+1;
    return 0;
}


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

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])


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])
    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])


n = int(input())
l = list(map(int,input().split()))
print(1,1)
print(-l[0])
if n==1:
    for i in range(2):
        print(1,1)
        print(0)
else:
    v1,v2=[],[0]
    for i in range(1,n):
        v1.append((l[i]%n)*(n-1))
        l[i]+=v1[-1]
        v2.append(l[i]//n)
    print(2,n)
    print(*v1)
    print(1,n)
    print(*v2)


n = int(input())
l = list(map(int,input().split()))
print(1,1)
print(-l[0])
if n==1:
    for i in range(2):
        print(1,1)
        print(0)
else:
    v1,v2=[],[0]
    for i in range(1,n):
        v1.append((l[i]%n)*(n-1))
        l[i]+=v1[-1]
        v2.append(-l[i])
    print(2,n)
    print(*v1)
    print(1,n)
    print(*v2)


n = int(input())
l = list(map(int,input().split()))
print(1,1)
print(-l[0])
if n==1:
    for i in range(2):
        print(1,1)
        print(0)
else:
    v1,v2=[],[0]
    for i in range(1,n):
        v1.append((l[i]%n)*(n-1))
        l[i]+=v1[-1]
        v2.append(-(l[i]//n))
    print(2,n)
    print(*v1)
    print(1,n)
    print(*v2)


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])
else:
    print(1,1)
    print(-a[0])
    print(2,n)
    b = [0]*(n-1)
    for i in range(1,n):
        b[i-1] = a[i]*(n-1)
    print(*b)
    print(1,n)
    b = [0]*(n)
    for i in range(1,n):
        b[i] = -a[i]*n
    print(*b)


import os
import sys
from io import BytesIO, IOBase
# region fastio

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")

# ------------------------------

def RL(): return map(int, sys.stdin.readline().rstrip().split())
def RLL(): return list(RL())
def N(): return int(input())
def comb(n, m): return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0
def perm(n, m): return factorial(n) // (factorial(n - m)) if n >= m else 0
def mdis(x1, y1, x2, y2): return abs(x1 - x2) + abs(y1 - y2)
def toord(c): return ord(c)-ord('a')
def lcm(a, b): return a*b//gcd(a, b)
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

# ------------------------------
# f = open('./input.txt')
# sys.stdin = f

def main():
    n = N()
    arr = RLL()

    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)
        res1 = [-arr[i]*n for i in range(0, n)]
        res1[0] = 0
        print(*res1)

        print(2, n)
        print(*[arr[i]*(n-1) for i in range(1, n)])

if __name__ == "__main__":
    main()


import os
import sys
from io import BytesIO, IOBase
# region fastio

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")

# ------------------------------

def RL(): return map(int, sys.stdin.readline().rstrip().split())
def RLL(): return list(RL())
def N(): return int(input())
def comb(n, m): return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0
def perm(n, m): return factorial(n) // (factorial(n - m)) if n >= m else 0
def mdis(x1, y1, x2, y2): return abs(x1 - x2) + abs(y1 - y2)
def toord(c): return ord(c)-ord('a')
def lcm(a, b): return a*b//gcd(a, b)
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

# ------------------------------
# f = open('./input.txt')
# sys.stdin = f

def main():
    n = N()
    arr = RLL()

    if n==1:
        print(1, 1)
        print(-n)
        print(1, 1)
        print(0)
        print(1, 1)
        print(0)
    else:
        print(1, 1)
        print(-arr[0])
        print(1, n)
        res1 = [(1-arr[i])*n for i in range(0, n)]
        res1[0] = 0
        print(*res1)

        print(2, n)
        print(*[i*(n-1) for i in range(1, n)])

if __name__ == "__main__":
    main()


import os
import sys
from io import BytesIO, IOBase
# region fastio

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")

# ------------------------------

def RL(): return map(int, sys.stdin.readline().rstrip().split())
def RLL(): return list(RL())
def N(): return int(input())
def comb(n, m): return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0
def perm(n, m): return factorial(n) // (factorial(n - m)) if n >= m else 0
def mdis(x1, y1, x2, y2): return abs(x1 - x2) + abs(y1 - y2)
def toord(c): return ord(c)-ord('a')
def lcm(a, b): return a*b//gcd(a, b)
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

# ------------------------------
# f = open('./input.txt')
# sys.stdin = f

def main():
    n = N()
    arr = RLL()

    if n==1:
        print(1, 1)
        print(-n)
        print(1, 1)
        print(0)
        print(1, 1)
        print(0)
    else:
        print(1, 1)
        print(-arr[0])
        print(1, n)
        res1 = [1-arr[i] for i in range(0, n)]
        res1[0] = 0
        print(*res1)

        print(2, n)
        print(*[-i for i in res1[1:]])

if __name__ == "__main__":
    main()


import os
import sys
from io import BytesIO, IOBase
# region fastio

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")

# ------------------------------

def RL(): return map(int, sys.stdin.readline().rstrip().split())
def RLL(): return list(RL())
def N(): return int(input())
def comb(n, m): return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0
def perm(n, m): return factorial(n) // (factorial(n - m)) if n >= m else 0
def mdis(x1, y1, x2, y2): return abs(x1 - x2) + abs(y1 - y2)
def toord(c): return ord(c)-ord('a')
def lcm(a, b): return a*b//gcd(a, b)
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

# ------------------------------
# f = open('./input.txt')
# sys.stdin = f

def main():
    n = N()
    arr = RLL()

    if n==1:
        print(1, 1)
        print(-n)
        print(1, 1)
        print(0)
        print(1, 1)
        print(0)
    else:
        print(1, 1)
        print(-arr[0])
        print(1, n)
        res1 = [(1-arr[i])*n for i in range(0, n)]
        res1[0] = 0
        print(*res1)

        print(2, n)
        print(*[-i*(n-1) for i in res1[1:]])

if __name__ == "__main__":
    main()


import os
import sys
from io import BytesIO, IOBase
# region fastio

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")

# ------------------------------

def RL(): return map(int, sys.stdin.readline().rstrip().split())
def RLL(): return list(RL())
def N(): return int(input())
def comb(n, m): return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0
def perm(n, m): return factorial(n) // (factorial(n - m)) if n >= m else 0
def mdis(x1, y1, x2, y2): return abs(x1 - x2) + abs(y1 - y2)
def toord(c): return ord(c)-ord('a')
def lcm(a, b): return a*b//gcd(a, b)
mod = 998244353
INF = float('inf')
from math import factorial, sqrt, ceil, floor, gcd
from collections import Counter, defaultdict, deque
from heapq import heapify, heappop, heappush

# ------------------------------
# f = open('./input.txt')
# sys.stdin = f

def main():
    n = N()
    arr = RLL()

    if n==1:
        print(1, 1)
        print(-n)
        print(1, 1)
        print(0)
        print(1, 1)
        print(0)
    else:
        print(1, 1)
        print(-arr[0])
        print(1, n)
        res1 = [-arr[i]*n for i in range(0, n)]
        res1[0] = 0
        print(*res1)

        print(2, n)
        print(*[arr[i]*(n-1) for i in range(1, n)])

if __name__ == "__main__":
    main()


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)
b = []
for i in range(n - 1):
    if a[i] % n != 0:
        b.append((n - 1) * (a[i] + n))
    else:
        b.append(0)
print(*b)
if a[n - 1] % n == 0:
    print(1, 1)
    print(0)
else:
    print(n, n)
    print(n - a[n - 1])
print(1, n)
c = []
for i in range(n - 1):
    c.append(-a[i] - b[i])
if a[n - 1] % n == 0:
    c.append(-a[n - 1])
else:
    c.append(-n)
print(*c)


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

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


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


from math import *
from bisect import *
from collections import Counter,defaultdict
from sys import stdin, stdout
input = stdin.readline
I =lambda:int(input())
SI =lambda:input()
M =lambda:map(int,input().split())
LI=lambda:list(map(int,input().split()))
n = I()
a = LI()

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()


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


#!/usr/bin/env pypy3

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

# first operation

to_add = []
for i in range(N-1):
	to_add += [A[i]*(N-1)]
print(1, N-1)
print(*to_add)

for i in range(N-1):
	A[i] += to_add[i]

# second operation

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

A[-1] += to_add

# print(A)

# third operation
to_add = []
for a in A:
	assert(a % N == 0)
	to_add += [-a]
print(1,N)
print(*to_add)


#!/usr/bin/env pypy3

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

# first operation

to_add = []
for i in range(N-1):
	to_add += [A[i]*(N-1)]
print(1, N-1)
print(*to_add)

for i in range(N-1):
	A[i] += to_add[i]

# second operation

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

A[-1] += to_add

# third operation
to_add = []
for a in A:
	assert(a % N == 0)
	to_add += [-a]
print(1,N)
print(*to_add)


#!/usr/bin/env pypy3

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

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

# first operation

to_add = []
for i in range(N-1):
	to_add += [A[i]*(N-1)]
print(1, N-1)
print(*to_add)

for i in range(N-1):
	A[i] += to_add[i]

# second operation

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

A[-1] += to_add

# print(A)

# third operation
to_add = []
for a in A:
	assert(a % N == 0)
	to_add += [-a]
print(1,N)
print(*to_add)


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])
else:
  print(1, n)
  for i in range(n):
    added = (n - 1 - (a[i] % (n - 1))) * n
    a[i] += added
    print(added, end=' ')
  print()
  print(1, n - 1)
  for i in range(n - 1):
    print(-a[i], end=' ')
  print()
  print(n, n)
  print(-a[n - 1])


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


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(-1*l[0])
    exit()

else:
    print(1,1)
    print(-1*l[0])
    print(1,n)
    o = [0]
    for i in range(1,len(l)):
        o.append(-1*len(l)*l[i])

    print(*o)
    print(2,n)
    o = []
    for i in range(1,len(l)):
        o.append((len(l)-1)*l[i])

    print(*o)


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

if n == 1:
	print('1 1', 0, '1 1', 0, '1 1', -a[0], sep = '\n')
	exit(0)
print(1, n)
b = []
for i in range(n - 1):
	b.append(-n * (a[i] % (n - 1)))
print(' '.join(map(str, b)), 0)
print(1, n - 1)
print(' '.join(str(-a[i] - b[i]) for i in range(n - 1)))
print(n, n)
print(-a[-1])


import math
n = int(input())
ints = list(map(int, input().split()))

if (n == 1):
    print(1, 1)
    print(0)
else:
    print(1, n - 1)
    res = [None for i in range(n - 1)]
    for i in range(n - 1):
        val = abs(ints[i] % n) * (n - 1)
        res[i] = int(math.copysign(val, ints[i]))
        ints[i] += res[i]
    print(" ".join(map(str, res)))

print(n, n)
print(n - ints[n - 1])
ints[n - 1] += n - ints[n - 1]

print(1, n)
for i in range(n):
    ints[i] *= -1
print(" ".join(map(str, ints)), end=" ")


import math
n = int(input())
ints = list(map(int, input().split()))

if (n == 1):
    print(1, 1)
    print(0)
else:
    print(1, n - 1)
    res = [None for i in range(n - 1)]
    for i in range(n - 1):
        val = abs(ints[i]) % n * (n - 1)
        res[i] = int(math.copysign(val, ints[i]))
        ints[i] += res[i]
    print(" ".join(map(str, res)))

print(n, n)
print(n - ints[n - 1])
ints[n - 1] += n - ints[n - 1]

print(1, n)
for i in range(n):
    ints[i] *= -1
print(" ".join(map(str, ints)), end=" ")


import math
n = int(input())
ints = list(map(int, input().split()))

print(1, n - 1)
res = [None for i in range(n - 1)]
for i in range(n - 1):
    val = abs(ints[i] % n) * (n - 1)
    res[i] = int(math.copysign(val, ints[i]))
    ints[i] += res[i]
print(" ".join(map(str, res)))

print(n, n)
print(n - ints[n - 1])
ints[n - 1] += n - ints[n - 1]

print(1, n)
for i in range(n):
    ints[i] *= -1
print(" ".join(map(str, ints)), end=" ")


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

print()
print(2,n)
for i in range(2,n):
    print(0,end=" ")

print(s[-1]*(n-1))
print()


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, os, io
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(sys.stdin.readline())
def ria(): return list(map(int, sys.stdin.readline().split()))
def ws(s): sys.stdout.write(s + '\n')
def wi(n): sys.stdout.write(str(n) + '\n')
def wia(a): sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math,datetime,functools,itertools,operator,bisect,fractions
from collections import deque,defaultdict,OrderedDict,Counter
from fractions import Fraction
from decimal import Decimal

def main():
    starttime=datetime.datetime.now()
    if(os.path.exists('input.txt')):
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")

    for _ in range(1):
        n=ri()
        a=ria()
        if n>1:
            print(1,1)
            print(-a[0])
            print(2,n)
            z=[]
            for i in range(1,n):
                z.append(a[i]*(n-1))
            print(*z)
            print(1,n)
            for i in range(n-1):
                z[i]*=-1
            print(0,*z)
        else:
            print(1,1)
            print(-a[0])
            print(1,1)
            print(0)
            print(1,1)
            print(0)

    #<--Solving Area Ends
    endtime=datetime.datetime.now()
    time=(endtime-starttime).total_seconds()*1000
    if(os.path.exists('input.txt')):
        print("Time:",time,"ms")

class FastReader(io.IOBase):
    newlines = 0

    def __init__(self, fd, chunk_size=1024 * 8):
        self._fd = fd
        self._chunk_size = chunk_size
        self.buffer = io.BytesIO()

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
            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, size=-1):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
            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()

class FastWriter(io.IOBase):

    def __init__(self, fd):
        self._fd = fd
        self.buffer = io.BytesIO()
        self.write = self.buffer.write

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

class FastStdin(io.IOBase):
    def __init__(self, fd=0):
        self.buffer = FastReader(fd)
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

class FastStdout(io.IOBase):
    def __init__(self, fd=1):
        self.buffer = FastWriter(fd)
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.flush = self.buffer.flush

if __name__ == '__main__':
    sys.stdin = FastStdin()
    sys.stdout = FastStdout()
    main()


import sys, os, io
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(sys.stdin.readline())
def ria(): return list(map(int, sys.stdin.readline().split()))
def ws(s): sys.stdout.write(s + '\n')
def wi(n): sys.stdout.write(str(n) + '\n')
def wia(a): sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math,datetime,functools,itertools,operator,bisect,fractions
from collections import deque,defaultdict,OrderedDict,Counter
from fractions import Fraction
from decimal import Decimal

def main():
    starttime=datetime.datetime.now()
    if(os.path.exists('input.txt')):
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")

    for _ in range(1):
        n=ri()
        a=ria()
        if n>1:
            print(1,1)
            print(-a[0])
            print(2,n)
            z=[]
            for i in range(1,n):
                z.append(a[i]*(n-1))
            print(*z)
            print(1,n)
            z=[]
            for i in range(1,n):
                z.append(-n*a[i])
            print(0,*z)
        else:
            print(1,1)
            print(-a[0])
            print(1,1)
            print(0)
            print(1,1)
            print(0)

    #<--Solving Area Ends
    endtime=datetime.datetime.now()
    time=(endtime-starttime).total_seconds()*1000
    if(os.path.exists('input.txt')):
        print("Time:",time,"ms")

class FastReader(io.IOBase):
    newlines = 0

    def __init__(self, fd, chunk_size=1024 * 8):
        self._fd = fd
        self._chunk_size = chunk_size
        self.buffer = io.BytesIO()

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
            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, size=-1):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
            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()

class FastWriter(io.IOBase):

    def __init__(self, fd):
        self._fd = fd
        self.buffer = io.BytesIO()
        self.write = self.buffer.write

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

class FastStdin(io.IOBase):
    def __init__(self, fd=0):
        self.buffer = FastReader(fd)
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

class FastStdout(io.IOBase):
    def __init__(self, fd=1):
        self.buffer = FastWriter(fd)
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.flush = self.buffer.flush

if __name__ == '__main__':
    sys.stdin = FastStdin()
    sys.stdout = FastStdout()
    main()


import sys
LI=lambda:list(map(int, sys.stdin.readline().strip('\n').split()))
MI=lambda:map(int, sys.stdin.readline().strip('\n').split())
SI=lambda:sys.stdin.readline().strip('\n')
II=lambda:int(sys.stdin.readline().strip('\n'))

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


import sys
LI=lambda:list(map(int, sys.stdin.readline().strip('\n').split()))
MI=lambda:map(int, sys.stdin.readline().strip('\n').split())
SI=lambda:sys.stdin.readline().strip('\n')
II=lambda:int(sys.stdin.readline().strip('\n'))

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


import sys
LI=lambda:list(map(int, sys.stdin.readline().strip('\n').split()))
MI=lambda:map(int, sys.stdin.readline().strip('\n').split())
SI=lambda:sys.stdin.readline().strip('\n')
II=lambda:int(sys.stdin.readline().strip('\n'))

n=II()
a=LI()
if n==1:
	print(1, 1)
	print(a[0])
	print(1, 1)
	print(-a[0])
	print(1, 1)
	print(-a[0])
	exit()
print(1, 1)
print((n-1)*a[0])
print(2, n)
print(*[(n-1)*a[i] for i in range(1, n)])
print(1, n)
print(*[-n*a[i] for i in range(n)])


import sys

n = int(sys.stdin.readline().strip())
a = list(map(int, sys.stdin.readline().strip().split()))

if n > 1:
    print(1, n)
    print(" ".join(list(map(str,
        [- a[i] * n for i in range (0, n)]))))
    print(2, n)
    print(" ".join(list(map(str,
        [a[i] * (n - 1) for i in range (1, n)]))))
    print(1, 1)
    print(a[0] * (n - 1))
else:
    print(1, 1)
    print(0)
    print(1, 1)
    print(0)
    print(1, 1)
    print(-a[0])


import sys

n = int(sys.stdin.readline().strip())
a = list(map(int, sys.stdin.readline().strip().split()))

print(1, n)
print(" ".join(list(map(str,
    [- a[i] * n for i in range (0, n)]))))
print(2, n)
print(" ".join(list(map(str,
    [a[i] * (n - 1) for i in range (1, n)]))))
print(1, 1)
print(a[0] * (n - 1))


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

print("1 1")
print(str((n-1) * a[0]))
print("2 " + str(n))
print(" ".join(map(lambda x:str((n-1) * x),a[1:])))
print("1 " + str(n))
print(" ".join(map(lambda x:str(-n * x),a)))


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

if n != 1:
  print("1 1")
  print(str((n-1) * a[0]))
  print("2 " + str(n))
  print(" ".join(map(lambda x:str((n-1) * x),a[1:])))
  print("1 " + str(n))
  print(" ".join(map(lambda x:str(-n * x),a)))
else:
  print("1 1")
  print(0)
  print("1 1")
  print(0)
  print("1 1")
  print(-a[0])


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

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

if n == 1:
    print("1 1\n0\n1 1\n0")
else:
    print(2, n)
    print(" ".join(str((n - 1) * (x % n)) for x in a[1:]))
    print(1, n)
    print(0, " ".join(str(n * (-(x//n) - (x % n))) for x in a[1:]))


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

// template and input by Egor Kulikov

fun main(args: Array<String>) {
    val inputStream = System.`in`
    val outputStream = System.out
    val `in` = InputReader(inputStream)
    val out = OutputWriter(outputStream)
    val solver = TaskA()
    // val testCount = Integer.parseInt(`in`.next())
    val testCount = 1
    for (i in 1..testCount) {
        solver.solve(i, `in`, out)
    }
    out.close()
}

internal class TaskA {
    fun solve(testNumber: Int, `in`: InputReader, out: OutputWriter) {
      val n = `in`.readInt()
      var l = 0
      var r = 0
      var a = LongArray(n)
      for(i in 0 until n) a[i] = `in`.readInt().toLong()
      var m = 0
      l = 1
      r = n
      m = n - 1
      out.print(l)
      out.print(" ")
      out.printLine(r)
      for(i in 0 until n) {
        if(i == m) {
          out.printLine(0)
          break
        }

        var temp = a[i]
        a[i] += n * (n * (m - (a[i] % m)))
        out.print(a[i] - temp)
        out.print(" ")
      }

      l = 1
      r = maxOf(l, n - 1)
      out.print(l)
      out.print(" ")
      out.printLine(r)
      for(i in 0 until n - 1) {
        out.print(-1 * a[i])
        out.print(" ")
        if(i == n - 2) out.printLine()
      }

      if(n == 1) out.printLine(0)

      l = n
      r = n
      out.print(l)
      out.print(" ")
      out.printLine(r)
      out.printLine(-1 * a[n - 1])
    }
}

internal class OutputWriter {
    private val writer: PrintWriter

    constructor(outputStream: OutputStream) {
        writer = PrintWriter(BufferedWriter(OutputStreamWriter(outputStream)))
    }

    constructor(writer: Writer) {
        this.writer = PrintWriter(writer)
    }

    fun print(vararg objects: Any) {
        for (i in objects.indices) {
            if (i != 0) {
                writer.print(' ')
            }
            writer.print(objects[i])
        }
    }

                fun printLine(vararg objects: Any) {
                    print(*objects)
                    writer.println()
                }

                fun close() {
                    writer.close()
                }

                fun printLine(i: Int) {
                    writer.println(i)
                }

            }

            internal class InputReader(private val stream: InputStream) {
                private val buf = ByteArray(1024)
                private var curChar: Int = 0
                private var numChars: Int = 0
                private val filter: InputReader.SpaceCharFilter? = null

                fun read(): Int {
                    if (numChars == -1) {
                        throw InputMismatchException()
                    }
                    if (curChar >= numChars) {
                        curChar = 0
                        try {
                            numChars = stream.read(buf)
                        } catch (e: IOException) {
                            throw InputMismatchException()
                        }

                        if (numChars <= 0) {
                            return -1
                        }
                    }
                    return buf[curChar++].toInt()
                }

                fun readInt(): Int {
                    var c = read()
                    while (isSpaceChar(c)) {
                        c = read()
                    }
                    var sgn = 1
                    if (c == '-'.toInt()) {
                        sgn = -1
                        c = read()
                    }
                    var res = 0
                    do {
                        if (c < '0'.toInt() || c > '9'.toInt()) {
                            throw InputMismatchException()
                        }
                        res *= 10
                        res += c - '0'.toInt()
                        c = read()
                    } while (!isSpaceChar(c))
                    return res * sgn
                }

                fun readString(): String {
                    var c = read()
                    while (isSpaceChar(c)) {
                        c = read()
                    }
                    val res = StringBuilder()
                    do {
                        if (Character.isValidCodePoint(c)) {
                            res.appendCodePoint(c)
                        }
                        c = read()
                    } while (!isSpaceChar(c))
                    return res.toString()
                }

                fun isSpaceChar(c: Int): Boolean {
                    return filter?.isSpaceChar(c) ?: isWhitespace(c)
                }

                operator fun next(): String {
                    return readString()
                }

                interface SpaceCharFilter {
                    fun isSpaceChar(ch: Int): Boolean

                }

                companion object {

                    fun isWhitespace(c: Int): Boolean {
                        return c == ' '.toInt() || c == '\n'.toInt() || c == '\r'.toInt() || c == '\t'.toInt() || c == -1
                    }
                }

            }


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Egor Kulikov (egor@egork.net)
 */
object programkt {
    @JvmStatic
    fun main(args: Array<String>) {
        val inputStream = System.`in`
        val outputStream = System.out
        val `in` = InputReader(inputStream)
        val out = OutputWriter(outputStream)
        val solver = TaskA()
        // val testCount = Integer.parseInt(`in`.next())
        val testCount = 1
        for (i in 1..testCount) {
            solver.solve(i, `in`, out)
        }
        out.close()
    }

    internal class TaskA {
        fun solve(testNumber: Int, `in`: InputReader, out: OutputWriter) {
            val n = `in`.readInt()
            var l = 0
            var r = 0
            var a = LongArray(n)
            for(i in 0 until n) a[i] = `in`.readInt().toLong()
            var m = 0
            l = 1
            r = n
            m = n - 1
            out.print(l)
            out.print(" ")
            out.printLine(r)
            for(i in 0 until n) {
              if(i == m) {
                out.printLine(0)
                break
              }

              var temp = a[i]
              a[i] += n * (n * (m - (a[i] % m)))
              out.print(a[i] - temp)
              out.print(" ")
            }

            l = 1
            r = maxOf(l, n - 1)
            out.print(l)
            out.print(" ")
            out.printLine(r)
            for(i in 0 until n - 1) {
              out.print(-1 * a[i])
              out.print(" ")
              if(i == n - 2) out.printLine()
            }

            if(n == 1) out.printLine(0)

            l = n
            r = n
            out.print(l)
            out.print(" ")
            out.printLine(r)
            out.printLine(-1 * a[n - 1])
        }
    }

    internal class OutputWriter {
        private val writer: PrintWriter

        constructor(outputStream: OutputStream) {
            writer = PrintWriter(BufferedWriter(OutputStreamWriter(outputStream)))
        }

        constructor(writer: Writer) {
            this.writer = PrintWriter(writer)
        }

        fun print(vararg objects: Any) {
            for (i in objects.indices) {
                if (i != 0) {
                    writer.print(' ')
                }
                writer.print(objects[i])
            }
        }

        fun printLine(vararg objects: Any) {
            print(*objects)
            writer.println()
        }

        fun close() {
            writer.close()
        }

        fun printLine(i: Int) {
            writer.println(i)
        }

    }

    internal class InputReader(private val stream: InputStream) {
        private val buf = ByteArray(1024)
        private var curChar: Int = 0
        private var numChars: Int = 0
        private val filter: InputReader.SpaceCharFilter? = null

        fun read(): Int {
            if (numChars == -1) {
                throw InputMismatchException()
            }
            if (curChar >= numChars) {
                curChar = 0
                try {
                    numChars = stream.read(buf)
                } catch (e: IOException) {
                    throw InputMismatchException()
                }

                if (numChars <= 0) {
                    return -1
                }
            }
            return buf[curChar++].toInt()
        }

        fun readInt(): Int {
            var c = read()
            while (isSpaceChar(c)) {
                c = read()
            }
            var sgn = 1
            if (c == '-'.toInt()) {
                sgn = -1
                c = read()
            }
            var res = 0
            do {
                if (c < '0'.toInt() || c > '9'.toInt()) {
                    throw InputMismatchException()
                }
                res *= 10
                res += c - '0'.toInt()
                c = read()
            } while (!isSpaceChar(c))
            return res * sgn
        }

        fun readString(): String {
            var c = read()
            while (isSpaceChar(c)) {
                c = read()
            }
            val res = StringBuilder()
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c)
                }
                c = read()
            } while (!isSpaceChar(c))
            return res.toString()
        }

        fun isSpaceChar(c: Int): Boolean {
            return filter?.isSpaceChar(c) ?: isWhitespace(c)
        }

        operator fun next(): String {
            return readString()
        }

        interface SpaceCharFilter {
            fun isSpaceChar(ch: Int): Boolean

        }

        companion object {

            fun isWhitespace(c: Int): Boolean {
                return c == ' '.toInt() || c == '\n'.toInt() || c == '\r'.toInt() || c == '\t'.toInt() || c == -1
            }
        }

    }
}


import java.io.PrintWriter
import java.util.*

@JvmField val INPUT = System.`in`
@JvmField val OUTPUT = System.out

@JvmField val _reader = INPUT.bufferedReader()
fun readLine(): String? = _reader.readLine()
fun readLn() = _reader.readLine()!!
@JvmField var _tokenizer: StringTokenizer = StringTokenizer("")
fun read(): String {
    while (_tokenizer.hasMoreTokens().not()) _tokenizer = StringTokenizer(_reader.readLine() ?: return "", " ")
    return _tokenizer.nextToken()
}
fun readInt() = read().toInt()
fun readDouble() = read().toDouble()
fun readLong() = read().toLong()
fun readStrings(n: Int) = List(n) { read() }
fun readLines(n: Int) = List(n) { readLn() }
fun readInts(n: Int) = List(n) { read().toInt() }
fun readIntArray(n: Int) = IntArray(n) { read().toInt() }
fun readDoubles(n: Int) = List(n) { read().toDouble() }
fun readDoubleArray(n: Int) = DoubleArray(n) { read().toDouble() }
fun readLongs(n: Int) = List(n) { read().toLong() }
fun readLongArray(n: Int) = LongArray(n) { read().toLong() }

@JvmField val _writer = PrintWriter(OUTPUT, false)
inline fun output(block: PrintWriter.() -> Unit) { _writer.apply(block).flush() }

fun main(args: Array<String>) {
  var n = readInt()
  var l = 0
  var r = 0
  var a = readLongArray(n)
  var m = 0
  l = 1
  r = n
  m = n - 1
  print(l)
  print(" ")
  println(r)
  for(i in 0 until n) {
    if(i == m) {
      println(0)
      break
    }

    var temp = a[i]
    a[i] += n * (n * (m - (a[i] % m)))
    print(a[i] - temp)
    print(" ")
  }

  l = 1
  r = maxOf(l, n - 1)
  print(l)
  print(" ")
  println(r)
  for(i in 0 until n - 1) {
    print(-1 * a[i])
    print(" ")
    if(i == n - 2) println()
  }

  if(n == 1) println(0)

  l = n
  r = n
  print(l)
  print(" ")
  println(r)
  println(-1 * a[n - 1])
}


import java.io.PrintWriter
import java.util.*

@JvmField val INPUT = System.`in`
@JvmField val OUTPUT = System.out

@JvmField val _reader = INPUT.bufferedReader()
fun readLine(): String? = _reader.readLine()
fun readLn() = _reader.readLine()!!
@JvmField var _tokenizer: StringTokenizer = StringTokenizer("")
fun read(): String {
    while (_tokenizer.hasMoreTokens().not()) _tokenizer = StringTokenizer(_reader.readLine() ?: return "", " ")
    return _tokenizer.nextToken()
}
fun readInt() = read().toInt()
fun readDouble() = read().toDouble()
fun readLong() = read().toLong()
fun readStrings(n: Int) = List(n) { read() }
fun readLines(n: Int) = List(n) { readLn() }
fun readInts(n: Int) = List(n) { read().toInt() }
fun readIntArray(n: Int) = IntArray(n) { read().toInt() }
fun readDoubles(n: Int) = List(n) { read().toDouble() }
fun readDoubleArray(n: Int) = DoubleArray(n) { read().toDouble() }
fun readLongs(n: Int) = List(n) { read().toLong() }
fun readLongArray(n: Int) = LongArray(n) { read().toLong() }

@JvmField val _writer = PrintWriter(OUTPUT, false)
inline fun output(block: PrintWriter.() -> Unit) { _writer.apply(block).flush() }

fun main(args: Array<String>) {
  var n = readLong()
  var l = 0
  var r = 0
  var a = readLongArray(n)
  var m = 0
  l = 1
  r = n
  m = (n - 1).toLong()
  print(l)
  print(" ")
  println(r)

  for(i in 0 until n) {
    if(i == m) {
      println(0)
      break
    }

    var temp = a[i]
    a[i] += n * (n * (m - (a[i] % m)))
    print(a[i] - temp)
    print(" ")
  }

  l = 1
  r = maxOf(l, n - 1)
  print(l)
  print(" ")
  println(r)

  for(i in 0 until n - 1) {
    print(-1 * a[i])
    print(" ")
    if(i == n - 2) println()
  }

  if(n == 1) println(0)

  l = n
  r = n
  print(l)
  print(" ")
  println(r)
  println(-1 * a[n - 1])
}


import java.io.PrintWriter
import java.util.*

@JvmField val INPUT = System.`in`
@JvmField val OUTPUT = System.out

@JvmField val _reader = INPUT.bufferedReader()
fun readLine(): String? = _reader.readLine()
fun readLn() = _reader.readLine()!!
@JvmField var _tokenizer: StringTokenizer = StringTokenizer("")
fun read(): String {
    while (_tokenizer.hasMoreTokens().not()) _tokenizer = StringTokenizer(_reader.readLine() ?: return "", " ")
    return _tokenizer.nextToken()
}
fun readInt() = read().toInt()
fun readDouble() = read().toDouble()
fun readLong() = read().toLong()
fun readStrings(n: Int) = List(n) { read() }
fun readLines(n: Int) = List(n) { readLn() }
fun readInts(n: Int) = List(n) { read().toInt() }
fun readIntArray(n: Int) = IntArray(n) { read().toInt() }
fun readDoubles(n: Int) = List(n) { read().toDouble() }
fun readDoubleArray(n: Int) = DoubleArray(n) { read().toDouble() }
fun readLongs(n: Int) = List(n) { read().toLong() }
fun readLongArray(n: Int) = LongArray(n) { read().toLong() }

@JvmField val _writer = PrintWriter(OUTPUT, false)
inline fun output(block: PrintWriter.() -> Unit) { _writer.apply(block).flush() }

fun main(args: Array<String>) {
  var n = readInt()
  var l = 0
  var r = 0
  var a = readLongArray(n)
  var m = 0
  l = 1
  r = n
  m = n - 1
  print(l)
  print(" ")
  println(r)
  for(i in 0 until n) {
    if(i == m) {
      println(0)
      break
    }

    var temp = a[i]
    a[i] += n * (n * (m - (a[i] % m)))
    print(a[i] - temp)
    print(" ")
  }

  l = 1
  r = maxOf(l, n - 1)
  for(i in 0 until n - 1) {
    print(-1 * a[i])
    print(" ")
    if(i == n - 2) println()
  }

  if(n == 1) println(0)

  l = n
  r = n
  print(l)
  print(" ")
  println(r)
  println(-1 * a[n - 1])
}


import java.io.PrintWriter
import java.util.*

@JvmField val INPUT = System.`in`
@JvmField val OUTPUT = System.out

@JvmField val _reader = INPUT.bufferedReader()
fun readLine(): String? = _reader.readLine()
fun readLn() = _reader.readLine()!!
@JvmField var _tokenizer: StringTokenizer = StringTokenizer("")
fun read(): String {
    while (_tokenizer.hasMoreTokens().not()) _tokenizer = StringTokenizer(_reader.readLine() ?: return "", " ")
    return _tokenizer.nextToken()
}
fun readInt() = read().toInt()
fun readDouble() = read().toDouble()
fun readLong() = read().toLong()
fun readStrings(n: Int) = List(n) { read() }
fun readLines(n: Int) = List(n) { readLn() }
fun readInts(n: Int) = List(n) { read().toInt() }
fun readIntArray(n: Int) = IntArray(n) { read().toInt() }
fun readDoubles(n: Int) = List(n) { read().toDouble() }
fun readDoubleArray(n: Int) = DoubleArray(n) { read().toDouble() }
fun readLongs(n: Int) = List(n) { read().toLong() }
fun readLongArray(n: Int) = LongArray(n) { read().toLong() }

@JvmField val _writer = PrintWriter(OUTPUT, false)
inline fun output(block: PrintWriter.() -> Unit) { _writer.apply(block).flush() }

fun main(args: Array<String>) {
  var n = readInt()
  var l = 0
  var r = 0
  var a = readLongArray(n)
  var m = 0
  l = 1
  r = n
  m = n - 1
  print(l)
  print(" ")
  println(r)
  for(i in 0 until n) {
    if(i == m) {
      println(0)
      break
    }

    var temp = a[i]
    a[i] += n * (n * (m - (a[i] % m)))
    print(a[i] - temp)
    print(" ")
  }

  l = 1
  r = maxOf(l, n - 1)
  print(r)
  print(" ")
  println(r)
  for(i in 0 until n - 1) {
    print(-1 * a[i])
    print(" ")
    if(i == n - 2) println()
  }

  if(n == 1) println(0)

  l = n
  r = n
  print(l)
  print(" ")
  println(r)
  println(-1 * a[n - 1])
}


import java.io.PrintWriter
import java.util.*

@JvmField val INPUT = System.`in`
@JvmField val OUTPUT = System.out

@JvmField val _reader = INPUT.bufferedReader()
fun readLine(): String? = _reader.readLine()
fun readLn() = _reader.readLine()!!
@JvmField var _tokenizer: StringTokenizer = StringTokenizer("")
fun read(): String {
    while (_tokenizer.hasMoreTokens().not()) _tokenizer = StringTokenizer(_reader.readLine() ?: return "", " ")
    return _tokenizer.nextToken()
}
fun readInt() = read().toInt()
fun readDouble() = read().toDouble()
fun readLong() = read().toLong()
fun readStrings(n: Int) = List(n) { read() }
fun readLines(n: Int) = List(n) { readLn() }
fun readInts(n: Int) = List(n) { read().toInt() }
fun readIntArray(n: Int) = IntArray(n) { read().toInt() }
fun readDoubles(n: Int) = List(n) { read().toDouble() }
fun readDoubleArray(n: Int) = DoubleArray(n) { read().toDouble() }
fun readLongs(n: Int) = List(n) { read().toLong() }
fun readLongArray(n: Int) = LongArray(n) { read().toLong() }

@JvmField val _writer = PrintWriter(OUTPUT, false)
inline fun output(block: PrintWriter.() -> Unit) { _writer.apply(block).flush() }

fun main(args: Array<String>) {
  var n = readInt()
  var l = 0
  var r = 0
  var a = readLongArray(n)
  var m = 0
  l = 1
  r = n
  m = (n - 1).toLong()
  print(l)
  print(" ")
  println(r)

  for(i in 0 until n) {
    if(i == m) {
      println(0)
      break
    }

    var temp = a[i]
    a[i] += n * (n * (m - (a[i] % m)))
    print(a[i] - temp)
    print(" ")
  }

  l = 1
  r = maxOf(l, n - 1)
  print(l)
  print(" ")
  println(r)

  for(i in 0 until n - 1) {
    print(-1 * a[i])
    print(" ")
    if(i == n - 2) println()
  }

  if(n == 1) println(0)

  l = n
  r = n
  print(l)
  print(" ")
  println(r)
  println(-1 * a[n - 1])
}


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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Egor Kulikov (egor@egork.net)
 */
object programkt {
    @JvmStatic
    fun main(args: Array<String>) {
        val inputStream = System.`in`
        val outputStream = System.out
        val `in` = InputReader(inputStream)
        val out = OutputWriter(outputStream)
        val solver = TaskA()
        // val testCount = Integer.parseInt(`in`.next())
        val testCount = 1
        for (i in 1..testCount) {
            solver.solve(i, `in`, out)
        }
        out.close()
    }

    internal class TaskA {
        fun solve(testNumber: Int, `in`: InputReader, out: OutputWriter) {
            val n = `in`.readInt()
            var l = 0
            var r = 0
            var a = IntArray(n)
            for(i in 0 until n) a[i] = `in`.readInt()
            var m = 0
            l = 1
            r = n
            m = n - 1
            out.print(l)
            out.print(" ")
            out.printLine(r)
            for(i in 0 until n) {
              if(i == m) {
                out.printLine(0)
                break
              }

              var temp = a[i]
              a[i] += n * (n * (m - (a[i] % m)))
              out.print(a[i] - temp)
              out.print(" ")
            }

            l = 1
            r = maxOf(l, n - 1)
            out.print(l)
            out.print(" ")
            out.printLine(r)
            for(i in 0 until n - 1) {
              out.print(-1 * a[i])
              out.print(" ")
              if(i == n - 2) out.printLine()
            }

            if(n == 1) out.printLine(0)

            l = n
            r = n
            out.print(l)
            out.print(" ")
            out.printLine(r)
            out.printLine(-1 * a[n - 1])
        }
    }

    internal class OutputWriter {
        private val writer: PrintWriter

        constructor(outputStream: OutputStream) {
            writer = PrintWriter(BufferedWriter(OutputStreamWriter(outputStream)))
        }

        constructor(writer: Writer) {
            this.writer = PrintWriter(writer)
        }

        fun print(vararg objects: Any) {
            for (i in objects.indices) {
                if (i != 0) {
                    writer.print(' ')
                }
                writer.print(objects[i])
            }
        }

        fun printLine(vararg objects: Any) {
            print(*objects)
            writer.println()
        }

        fun close() {
            writer.close()
        }

        fun printLine(i: Int) {
            writer.println(i)
        }

    }

    internal class InputReader(private val stream: InputStream) {
        private val buf = ByteArray(1024)
        private var curChar: Int = 0
        private var numChars: Int = 0
        private val filter: InputReader.SpaceCharFilter? = null

        fun read(): Int {
            if (numChars == -1) {
                throw InputMismatchException()
            }
            if (curChar >= numChars) {
                curChar = 0
                try {
                    numChars = stream.read(buf)
                } catch (e: IOException) {
                    throw InputMismatchException()
                }

                if (numChars <= 0) {
                    return -1
                }
            }
            return buf[curChar++].toInt()
        }

        fun readInt(): Int {
            var c = read()
            while (isSpaceChar(c)) {
                c = read()
            }
            var sgn = 1
            if (c == '-'.toInt()) {
                sgn = -1
                c = read()
            }
            var res = 0
            do {
                if (c < '0'.toInt() || c > '9'.toInt()) {
                    throw InputMismatchException()
                }
                res *= 10
                res += c - '0'.toInt()
                c = read()
            } while (!isSpaceChar(c))
            return res * sgn
        }

        fun readString(): String {
            var c = read()
            while (isSpaceChar(c)) {
                c = read()
            }
            val res = StringBuilder()
            do {
                if (Character.isValidCodePoint(c)) {
                    res.appendCodePoint(c)
                }
                c = read()
            } while (!isSpaceChar(c))
            return res.toString()
        }

        fun isSpaceChar(c: Int): Boolean {
            return filter?.isSpaceChar(c) ?: isWhitespace(c)
        }

        operator fun next(): String {
            return readString()
        }

        interface SpaceCharFilter {
            fun isSpaceChar(ch: Int): Boolean

        }

        companion object {

            fun isWhitespace(c: Int): Boolean {
                return c == ' '.toInt() || c == '\n'.toInt() || c == '\r'.toInt() || c == '\t'.toInt() || c == -1
            }
        }

    }
}


private fun readLn() = readLine()!! // string line
private fun readStrings() = readLn().split(" ") // list of strings
private fun readLong() = readLn().toLong()
private fun readLongs() = readStrings().map { it.toLong() } // list of ints
private fun readInt() = readLn().toInt() // single int
private fun readInts() = readStrings().map { it.toInt() } // list of ints

// var tree = mutableMapOf<Int, MutableList<Int>>()
// var matrix = Array(1) {Array(1) {0L} }

fun main() {
//    val t = readInt()
//    for (cases in 0 until t) {
//        solve()
//    }

    solve()
}

fun solve() {
    val n = readInt()
    val ar = readLongs()

    if (n == 1) {
        println("1 1")
        println("-${ar[0]}")
        println("1 1")
        println("0")
        println("1 1")
        println("0")
        return
    }

    var ans = mutableListOf<String>()
    ans.add("1 $n\n")
    for (i in 0 until n) {
        ans.add("-${n * ar[i]} ")
    }

    ans.add("\n")

    ans.add("1 ${n-1}\n")
    for (i in 0 until n - 1) {
        ans.add("${(n-1) * ar[i]} ")
    }
    ans.add("\n")

    ans.add("$n $n\n")
    ans.add("${(n-1) * ar[n-1]} ")

    println(ans.joinToString(""))
}


private fun readLn() = readLine()!! // string line
private fun readStrings() = readLn().split(" ") // list of strings
private fun readLong() = readLn().toLong()
private fun readLongs() = readStrings().map { it.toLong() } // list of ints
private fun readInt() = readLn().toInt() // single int
private fun readInts() = readStrings().map { it.toInt() } // list of ints

// var tree = mutableMapOf<Int, MutableList<Int>>()
// var matrix = Array(1) {Array(1) {0L} }

fun main() {
//    val t = readInt()
//    for (cases in 0 until t) {
//        solve()
//    }

    solve()
}

fun solve() {
    val n = readInt()
    val ar = readLongs()

    if (n == 1) {
        println("1 1")
        println("-${ar[0]}")
        println("1 1")
        println("0")
        println("1 1")
        println("0")
        return
    }

    var ans = mutableListOf<String>()
    ans.add("1 $n\n")
    for (i in 0 until n) {
        ans.add("${-1 * n * ar[i]} ")
    }

    ans.add("\n")

    ans.add("1 ${n-1}\n")
    for (i in 0 until n - 1) {
        ans.add("${(n-1) * ar[i]} ")
    }
    ans.add("\n")

    ans.add("$n $n\n")
    ans.add("${(n-1) * ar[n-1]} ")

    println(ans.joinToString(""))
}


fun main() {
    val n = readLine()!!.toInt()
    val a = readLine()!!.split(' ').map { it.toLong() }.toTypedArray()

    if (n == 1) {
        println("1 1")
        println("0")
        println("1 1")
        println("0")
        println("1 1")
        println("${-a[0]}")
    } else {
        println("1 ${n - 1}")
        val b1 = (0 until n - 1).map { i -> a[i] * (n - 1L) }
        println(b1.joinToString(" "))

        for (i in 0 until n - 1) {
            a[i] += b1[i]
        }

        println("$n $n")
        val b2 = a[n - 1] * (n - 1L)
        println("$b2")
        a[n - 1] += b2

        println("1 $n")
        println(a.map { -it }.joinToString(" "))
    }
}


val n = readLine()!!.toInt()
val a = readLine()!!.split(' ').map { it.toLong() }.toTypedArray()

if (n == 1) {
    println("1 1")
    println("0")
    println("1 1")
    println("0")
    println("1 1")
    println("${-a[0]}")
} else {
    println("1 ${n - 1}")
    val b1 = (0 until n - 1).map { i -> a[i] * (n - 1L) }
    println(b1.joinToString(" "))

    for (i in 0 until n - 1) {
        a[i] += b1[i]
    }

    println("$n $n")
    val b2 = a[n - 1] * (n - 1L)
    println("$b2")
    a[n - 1] += b2

    println("1 $n")
    println(a.map { -it }.joinToString(" "))
}


@file:Suppress("NOTHING_TO_INLINE", "EXPERIMENTAL_FEATURE_WARNING", "OVERRIDE_BY_INLINE")
//@file:OptIn(ExperimentalStdlibApi::class)

import java.io.PrintWriter
import java.util.TreeMap
import kotlin.math.*
import kotlin.random.Random
import kotlin.collections.sort as _sort
import kotlin.collections.sortDescending as _sortDescending
import kotlin.io.println as iprintln

/** @author Spheniscine */
fun main() { _writer.solve(); _writer.flush() }
fun PrintWriter.solve() {
//    val startTime = System.nanoTime()

    val numCases = 1//readInt()
    case@ for(case in 1..numCases) {
//        print("Case #$case: ")

        val n = readInt()
        val A = readLongArray(n)

        println("1 1")
        println(-A[0])
        A[0] = 0

        if(n == 1) {
            println("1 1\n0\n1 1\n0")
        } else {
            println("1 $n")
            var B = LongArray(n) { A[it] % (n-1) * -n }
            for(i in 0 until n) A[i] += B[i]
            println(B.joinToString(" "))

            println("2 $n")
            B = LongArray(n-1) { -A[it+1] }
            println(B.joinToString(" "))
        }
    }

//    iprintln("Time: ${(System.nanoTime() - startTime) / 1000000} ms")
}

const val inf = Int.MAX_VALUE shr 1

/** IO */
//@JvmField val INPUT = File("input.txt").inputStream()
//@JvmField val OUTPUT = File("output.txt").outputStream()
@JvmField val INPUT = System.`in`
@JvmField val OUTPUT = System.out

const val _BUFFER_SIZE = 1 shl 16
@JvmField val _buffer = ByteArray(_BUFFER_SIZE)
@JvmField var _bufferPt = 0
@JvmField var _bytesRead = 0

tailrec fun readChar(): Char {
    if(_bufferPt == _bytesRead) {
        _bufferPt = 0
        _bytesRead = INPUT.read(_buffer, 0, _BUFFER_SIZE)
    }
    return if(_bytesRead < 0) Char.MIN_VALUE
    else {
        val c = _buffer[_bufferPt++].toChar()
        if (c == '\r') readChar()
        else c
    }
}

fun readLine(): String? {
    var c = readChar()
    return if(c == Char.MIN_VALUE) null
    else buildString {
        while(c != '\n' && c != Char.MIN_VALUE) {
            append(c)
            c = readChar()
        }
    }
}
fun readLn() = readLine()!!

fun read() = buildString {
    var c = readChar()
    while(c <= ' ') {
        if(c == Char.MIN_VALUE) return@buildString
        c = readChar()
    }
    do {
        append(c)
        c = readChar()
    } while(c > ' ')
}
fun readInt() = read().toInt()
fun readDouble() = read().toDouble()
fun readLong() = read().toLong()
fun readStrings(n: Int) = List(n) { read() }
fun readLines(n: Int) = List(n) { readLn() }
fun readInts(n: Int) = List(n) { read().toInt() }
fun readIntArray(n: Int) = IntArray(n) { read().toInt() }
fun readDoubles(n: Int) = List(n) { read().toDouble() }
fun readDoubleArray(n: Int) = DoubleArray(n) { read().toDouble() }
fun readLongs(n: Int) = List(n) { read().toLong() }
fun readLongArray(n: Int) = LongArray(n) { read().toLong() }

@JvmField val _writer = PrintWriter(OUTPUT, false)

/** shuffles and sort overrides to avoid quicksort attacks */
private inline fun <T> _shuffle(rnd: Random, get: (Int) -> T, set: (Int, T) -> Unit, size: Int) {
    // Fisher-Yates shuffle algorithm
    for (i in size - 1 downTo 1) {
        val j = rnd.nextInt(i + 1)
        val temp = get(i)
        set(i, get(j))
        set(j, temp)
    }
}

@JvmField var _random: Random? = null
val random get() = _random ?: Random(0x594E215C123 * System.nanoTime()).also { _random = it }

fun IntArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)
fun IntArray.sort() { shuffle(); _sort() }
fun IntArray.sortDescending() { shuffle(); _sortDescending() }

fun LongArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)
fun LongArray.sort() { shuffle(); _sort() }
fun LongArray.sortDescending() { shuffle(); _sortDescending() }

fun DoubleArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)
fun DoubleArray.sort() { shuffle(); _sort() }
fun DoubleArray.sortDescending() { shuffle(); _sortDescending() }

fun CharArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)
inline fun CharArray.sort() { _sort() }
inline fun CharArray.sortDescending() { _sortDescending() }

inline fun <T: Comparable<T>> Array<out T>.sort() = _sort()
inline fun <T: Comparable<T>> Array<out T>.sortDescending() = _sortDescending()
inline fun <T: Comparable<T>> MutableList<out T>.sort() = _sort()
inline fun <T: Comparable<T>> MutableList<out T>.sortDescending() = _sortDescending()

fun `please stop removing these imports IntelliJ`() { iprintln(max(1, 2)) }

/** additional commons */
inline fun <T> Iterable<T>.sumByLong(func: (T) -> Long) = fold(0L) { acc, t -> acc + func(t) }
inline fun <T> Sequence<T>.sumByLong(func: (T) -> Long) = fold(0L) { acc, t -> acc + func(t) }
inline fun <T> Array<T>.sumByLong(func: (T) -> Long) = fold(0L) { acc, t -> acc + func(t) }
fun IntArray.sumLong() = fold(0L, Long::plus)


@file:Suppress("NOTHING_TO_INLINE", "EXPERIMENTAL_FEATURE_WARNING", "OVERRIDE_BY_INLINE")
//@file:OptIn(ExperimentalStdlibApi::class)

import java.io.PrintWriter
import java.util.TreeMap
import kotlin.math.*
import kotlin.random.Random
import kotlin.collections.sort as _sort
import kotlin.collections.sortDescending as _sortDescending
import kotlin.io.println as iprintln

/** @author Spheniscine */
fun main() { _writer.solve(); _writer.flush() }
fun PrintWriter.solve() {
//    val startTime = System.nanoTime()

    val numCases = 1//readInt()
    case@ for(case in 1..numCases) {
//        print("Case #$case: ")

        val n = readInt()
        val A = readLongArray(n)

        if(n == 1) {
            println("1 1\n${-A[0]}\n1 1\n0\n1 1\n0")
        } else {
            println("1 $n")
            var B = LongArray(n) { i -> (-A[i] * n).also { A[i] += it } }
            println(B.joinToString(" "))

            println("1 1\n${-A[0]}")

            println("2 $n")
            B = LongArray(n-1) { -A[it+1] }
            println(B.joinToString(" "))
        }
    }

//    iprintln("Time: ${(System.nanoTime() - startTime) / 1000000} ms")
}

/** IO */
//@JvmField val INPUT = File("input.txt").inputStream()
//@JvmField val OUTPUT = File("output.txt").outputStream()
@JvmField val INPUT = System.`in`
@JvmField val OUTPUT = System.out

const val _BUFFER_SIZE = 1 shl 16
@JvmField val _buffer = ByteArray(_BUFFER_SIZE)
@JvmField var _bufferPt = 0
@JvmField var _bytesRead = 0

tailrec fun readChar(): Char {
    if(_bufferPt == _bytesRead) {
        _bufferPt = 0
        _bytesRead = INPUT.read(_buffer, 0, _BUFFER_SIZE)
    }
    return if(_bytesRead < 0) Char.MIN_VALUE
    else {
        val c = _buffer[_bufferPt++].toChar()
        if (c == '\r') readChar()
        else c
    }
}

fun readLine(): String? {
    var c = readChar()
    return if(c == Char.MIN_VALUE) null
    else buildString {
        while(c != '\n' && c != Char.MIN_VALUE) {
            append(c)
            c = readChar()
        }
    }
}
fun readLn() = readLine()!!

fun read() = buildString {
    var c = readChar()
    while(c <= ' ') {
        if(c == Char.MIN_VALUE) return@buildString
        c = readChar()
    }
    do {
        append(c)
        c = readChar()
    } while(c > ' ')
}
fun readInt() = read().toInt()
fun readDouble() = read().toDouble()
fun readLong() = read().toLong()
fun readStrings(n: Int) = List(n) { read() }
fun readLines(n: Int) = List(n) { readLn() }
fun readInts(n: Int) = List(n) { read().toInt() }
fun readIntArray(n: Int) = IntArray(n) { read().toInt() }
fun readDoubles(n: Int) = List(n) { read().toDouble() }
fun readDoubleArray(n: Int) = DoubleArray(n) { read().toDouble() }
fun readLongs(n: Int) = List(n) { read().toLong() }
fun readLongArray(n: Int) = LongArray(n) { read().toLong() }

@JvmField val _writer = PrintWriter(OUTPUT, false)

/** shuffles and sort overrides to avoid quicksort attacks */
private inline fun <T> _shuffle(rnd: Random, get: (Int) -> T, set: (Int, T) -> Unit, size: Int) {
    // Fisher-Yates shuffle algorithm
    for (i in size - 1 downTo 1) {
        val j = rnd.nextInt(i + 1)
        val temp = get(i)
        set(i, get(j))
        set(j, temp)
    }
}

@JvmField var _random: Random? = null
val random get() = _random ?: Random(0x594E215C123 * System.nanoTime()).also { _random = it }

fun IntArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)
fun IntArray.sort() { shuffle(); _sort() }
fun IntArray.sortDescending() { shuffle(); _sortDescending() }

fun LongArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)
fun LongArray.sort() { shuffle(); _sort() }
fun LongArray.sortDescending() { shuffle(); _sortDescending() }

fun DoubleArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)
fun DoubleArray.sort() { shuffle(); _sort() }
fun DoubleArray.sortDescending() { shuffle(); _sortDescending() }

fun CharArray.shuffle(rnd: Random = random) = _shuffle(rnd, ::get, ::set, size)
inline fun CharArray.sort() { _sort() }
inline fun CharArray.sortDescending() { _sortDescending() }

inline fun <T: Comparable<T>> Array<out T>.sort() = _sort()
inline fun <T: Comparable<T>> Array<out T>.sortDescending() = _sortDescending()
inline fun <T: Comparable<T>> MutableList<out T>.sort() = _sort()
inline fun <T: Comparable<T>> MutableList<out T>.sortDescending() = _sortDescending()

fun `please stop removing these imports IntelliJ`() { iprintln(max(1, 2)) }

/** additional commons */
inline fun <T> Iterable<T>.sumByLong(func: (T) -> Long) = fold(0L) { acc, t -> acc + func(t) }
inline fun <T> Sequence<T>.sumByLong(func: (T) -> Long) = fold(0L) { acc, t -> acc + func(t) }
inline fun <T> Array<T>.sumByLong(func: (T) -> Long) = fold(0L) { acc, t -> acc + func(t) }
fun IntArray.sumLong() = fold(0L, Long::plus)


import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.io.PrintWriter
import java.util.*

fun PrintWriter.solve(sc: FastScanner) {
    val n = sc.nextInt()
    val a = Array(n) { sc.nextLong() }
    println("$n $n")
    println((n - 1) * a[n - 1])
    println("1 $n")
    val b = (0 until n).map { -n * a[it] }
    println(b.joinToString(" "))
    println("1 ${n - 1}")
    val c = (0 until n - 1).map { (n - 1) * a[it] }
    println(c.joinToString(" "))
}

fun main() {
    val writer = PrintWriter(System.out, false)
    writer.solve(FastScanner(System.`in`))
    writer.flush()
}

class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    fun next(): String {
        while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())

        return st.nextToken()
    }

    fun nextInt() = next().toInt()
    fun nextLong() = next().toLong()
    fun nextLine() = br.readLine()
    fun nextDouble() = next().toDouble()
    fun ready() = br.ready()
}