Problem: You are given an array a of n integers.

You want to make all elements of a equal to zero by doing the following operation exactly three times:

  * Select a segment, for each number in this segment we can add a multiple of len to it, where len is the length of this segment (added integers can be different). 



It can be proven that it is always possible to make all elements of a equal to zero.

Input

The first line contains one integer n (1 ≤ n ≤ 100 000): the number of elements of the array.

The second line contains n elements of an array a separated by spaces: a_1, a_2, ..., a_n (-10^9 ≤ a_i ≤ 10^9).

Output

The output should contain six lines representing three operations.

For each operation, print two lines:

  * The first line contains two integers l, r (1 ≤ l ≤ r ≤ n): the bounds of the selected segment.

  * The second line contains r-l+1 integers b_l, b_{l+1}, ..., b_r (-10^{18} ≤ b_i ≤ 10^{18}): the numbers to add to a_l, a_{l+1}, …, a_r, respectively; b_i should be divisible by r - l + 1.

Example

Input


4
1 3 2 4


Output


1 1 
-1
3 4
4 2
2 4
-3 -6 -6

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
long long maxPrimeFactors(long long n) {
  long long maxPrime = -1;
  while (n % 2 == 0) {
    maxPrime = 2;
    n >>= 1;
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    while (n % i == 0) {
      maxPrime = i;
      n = n / i;
    }
  }
  if (n > 2) maxPrime = n;
  return maxPrime;
}
long long gcd(long long a, long long b) { return (b ? gcd(b, a % b) : a); }
long long P(long long B, long long power, long long modulo) {
  long long ans = 1LL;
  while (power > 0LL) {
    if (power % 2LL == 1LL) {
      ans = (ans * B) % modulo;
    }
    B = (B * B) % modulo;
    power /= 2LL;
  }
  return ans;
}
bool isPrime(long long n) {
  if (n <= 1LL) {
    return false;
  }
  if (n <= 3LL) {
    return true;
  }
  if (n % 2 == 0LL || n % 3 == 0LL) {
    return false;
  }
  for (long long i = 5LL; (i * i) <= n; i += 6LL) {
    if (n % i == 0LL || n % (i + 2LL) == 0LL) {
      return false;
    }
  }
  return true;
}
long long lcm(long long a, long long b) { return (a / gcd(a, b) * b); }
void combinationUtil(int arr[], int n, int r, int index, int data[], int i);
void printCombination(int arr[], int n, int r) {
  int data[r];
  combinationUtil(arr, n, r, 0, data, 0);
}
void combinationUtil(int arr[], int n, int r, int index, int data[], int i) {
  if (index == r) {
    for (int j = 0; j < r; j++) cout << data[j] << " ";
    cout << endl;
    return;
  }
  if (i >= n) return;
  data[index] = arr[i];
  combinationUtil(arr, n, r, index + 1, data, i + 1);
  combinationUtil(arr, n, r, index, data, i + 1);
}
long long reccur(int arr[], int k, int n, int m, int start, int NoOfElements,
                 long long dp[][1005]) {
  if (k == NoOfElements) {
    return 0;
  }
  if (start == n) {
    return 0;
  }
  if (dp[start][NoOfElements] != -1) {
    return dp[start][NoOfElements];
  }
  long long take = arr[start] * ((NoOfElements + 1) % m) +
                   reccur(arr, k, n, m, start + 1, NoOfElements + 1, dp);
  long long notTake = reccur(arr, k, n, m, start + 1, NoOfElements, dp);
  long long qw = max(take, notTake);
  return qw;
}
long long findlcm(int arr[], int n) {
  long long ans = arr[0];
  for (int i = 1; i < n; i++) ans = (((arr[i] * ans)) / (gcd(arr[i], ans)));
  return ans;
}
unsigned long long int LCMmast(int arr[], int n) {
  int max_num = 0;
  for (int i = 0; i < n; i++)
    if (max_num < arr[i]) max_num = arr[i];
  unsigned long long int res = 1;
  int x = 2;
  while (x <= max_num) {
    vector<int> indexes;
    for (int j = 0; j < n; j++)
      if (arr[j] % x == 0) indexes.push_back(j);
    if (indexes.size() >= 2) {
      for (int j = 0; j < indexes.size(); j++)
        arr[indexes[j]] = arr[indexes[j]] / x;
      res = res * x;
    } else
      x++;
  }
  for (int i = 0; i < n; i++) res = res * arr[i];
  return res;
}
void printGolomb(int n, int l, int r) {
  long long dp[n];
  dp[1] = 1;
  for (int i = 2; i <= n; i++) {
    long long s = (1 + dp[i - dp[dp[i - 1]]]);
    dp[i] = s;
  }
  vector<int> v(n + 1);
  for (int i = 0; i < n; i++) {
    v[i] = (dp[i + 1] * dp[i + 1]) % 1000000007;
  }
  std::vector<int> prefixSum(n + 1);
  prefixSum[0] = v[0];
  for (int i = 1; i < n; i++)
    prefixSum[i] =
        (prefixSum[i - 1] % 1000000007 + v[i] % 1000000007) % 1000000007;
  long long ans = prefixSum[r - 1] - prefixSum[l - 2];
  cout << ans << endl;
}
bool helper(std::vector<int> &v, int n, int m, int idx) {
  if (idx == m) return 1;
  if (idx >= n) return 0;
  return helper(v, n, m, idx + v[idx]);
}
bool solve1(long long a, long long b, std::vector<long long> &res) {
  if (b < a) {
    return false;
  }
  if (a == b) {
    res.push_back(b);
    return true;
  }
  if (!(b & 1)) {
    res.push_back(b);
    return solve1(a, b / 2, res);
  } else if (b % 10 == 1) {
    res.push_back(b);
    return solve1(a, (b - 1) / 10, res);
  } else
    return false;
}
pair<int, int> findEntryWithLargestValue(map<int, int> sampleMap) {
  pair<int, int> entryWithMaxValue = make_pair(0, 0);
  map<int, int>::iterator currentEntry;
  for (currentEntry = sampleMap.begin(); currentEntry != sampleMap.end();
       ++currentEntry) {
    if (currentEntry->second > entryWithMaxValue.second) {
      entryWithMaxValue = make_pair(currentEntry->first, currentEntry->second);
    }
  }
  return entryWithMaxValue;
}
int maxCountSameSUM(std::vector<int> arr, int n) {
  unordered_map<int, int> M;
  for (int i = 0; i < n - 1; i++)
    for (int j = i + 1; j < n; j++) M[(arr[i] + arr[j])]++;
  int max_count = 0;
  for (auto ele : M)
    if (max_count < ele.second) max_count = ele.second;
  return max_count;
}
void solvE2() {
  long long n, curr = 0, ans = 0, now = 0;
  cin >> n;
  std::vector<long long> a(n);
  for (auto &i : a) {
    cin >> i;
  }
  sort(a.begin(), a.end());
  std::vector<long long> v;
  for (long long i = 0; i < n; ++i) {
    for (long long j = i; j < n; j++) v.push_back(a[i] + a[j]);
  }
  for (auto x : v) {
    now = 0;
    int i = 0, j = n - 1;
    while (i < j) {
      if (a[i] + a[j] == x) {
        now++, i++, j--;
      } else if (a[i] + a[j] > x)
        j--;
      else
        i++;
    }
    ans = max(ans, now);
  }
  cout << ans << endl;
}
int factmod(long long n, long long p) {
  long long res = 1;
  while (n > 1) {
    res = (res * ((n / p) % 2 ? p - 1 : 1)) % p;
    for (long long i = 2; i <= n % p; ++i) res = (res * i) % p;
    n /= p;
  }
  return res % p;
}
unsigned int factorial(unsigned int n) {
  if (n == 0) return 1;
  return n * factorial(n - 1);
}
bool isSubsetSum(vector<int> &set, int n, int sum) {
  bool subset[n + 1][sum + 1];
  for (int i = 0; i <= n; i++) subset[i][0] = true;
  for (int i = 1; i <= sum; i++) subset[0][i] = false;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= sum; j++) {
      if (j < set[i - 1]) subset[i][j] = subset[i - 1][j];
      if (j >= set[i - 1])
        subset[i][j] = subset[i - 1][j] || subset[i - 1][j - set[i - 1]];
    }
  }
  vector<int> ans;
  for (int i = 0; i <= sum / 2; i++) {
    if (subset[n][i] == 1) ans.push_back(i);
  }
  int mn = 99999999;
  for (auto i : ans) {
    mn = min(mn, sum - 2 * i);
  }
  return mn;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= sum; j++) cout << subset[i][j] << " ";
    printf("\n");
  }
}
int removeDigits(int n) {
  int cnt = 0;
  while (n) {
    cnt++;
    vector<int> digits;
    int cpy = n;
    while (cpy) {
      digits.push_back(cpy % 10);
      cpy /= 10;
    }
    n -= *max_element(digits.begin(), digits.end());
  }
  return cnt;
}
void coinChange() {
  int n, x;
  cin >> n >> x;
  std::vector<int> v(n);
  for (auto &i : v) {
    cin >> i;
  }
  int dp[n + 1][x + 1];
  for (int i = 0; i <= x; i++) {
    dp[0][i] = 0;
  }
  for (int i = 0; i <= n; i++) {
    dp[i][0] = 1;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= x; j++) {
      if (v[i - 1] <= j) {
        dp[i][j] = (dp[i - 1][j] + dp[i][j - v[i - 1]]) % 1000000007;
      } else {
        dp[i][j] = (dp[i - 1][j]) % 1000000007;
      }
    }
  }
  cout << dp[n][x];
}
void solve() {}
int arrGCD(std::vector<int> &v, int n) {
  if (n == 0) return -1;
  int ans = v[0];
  for (int i = 0; i < n; i++) {
    ans = gcd(ans, v[i]);
    if (ans == 1) return 1;
  }
  return ans;
}
int go(int n, int m) {
  if (n == m) return 1;
  if (n < 0) return 0;
}
int sw() {
  int n, k;
  cin >> n >> k;
  std::vector<int> v(n);
  for (auto &i : v) {
    cin >> i;
  }
  int limit = 0;
  int moves = 0;
  for (int i = 0; i < n; i++) {
    if (v[i] > k) {
      return -1;
    }
    if (limit + v[i] <= k) {
      limit += v[i];
    } else {
      moves++;
      limit = 0;
      i--;
    }
  }
  return moves + 1;
}
string solert() {
  int n, k;
  cin >> n >> k;
  int n0, n1;
  string s;
  cin >> s;
  for (auto i : s) {
    if (i == '0')
      n0++;
    else
      n1++;
  }
  bool w;
  if (n1 > n0)
    w = 1;
  else
    w = 0;
  if (n & 1) {
    int diff = abs(n0 - n1);
    if (diff == n) {
      string ans = "";
      for (int i = 0; i < max(n0, n1); i++) {
        if (w)
          ans += "1";
        else
          ans += "0";
      }
      return ans;
    } else if (diff == n - 2) {
      string temp = "";
      if (w) {
        for (int i = 0; i < n / 2; i++) {
          temp += "1";
        }
        temp += "0";
        for (int i = 0; i < n / 2; i++) {
          temp += "1";
        }
      } else {
        for (int i = 0; i < n / 2; i++) {
          temp += "0";
        }
        temp += "1";
        for (int i = 0; i < n / 2; i++) {
          temp += "0";
        }
      }
      string ans = "";
      for (int i = 0; i < n / k; i++) {
        ans += temp;
      }
      return ans;
    } else {
      return "IMPOSSIBLE";
    }
  } else {
    int diff = abs(n0 - n1);
    if (diff == n) {
      string ans = "";
      for (int i = 0; i < max(n0, n1); i++) {
        if (w)
          ans += "1";
        else
          ans += "0";
      }
      return ans;
    } else if (diff == 0) {
      string ans = "";
      string temp = "01";
      for (int i = 0; i < n; i++) {
        if (i & 1)
          ans += "10";
        else
          ans += "01";
      }
      return ans;
    } else {
      return "IMPOSSIBLE";
    }
  }
}
void collectingPackages() {
  int n;
  string ans;
  cin >> n;
  std::vector<int> adj[1001];
  int len = 0, bre = 0;
  while (n--) {
    int a, b;
    cin >> a >> b;
    len = max(len, a);
    bre = max(bre, b);
    adj[a].push_back(b);
  }
  for (int i = 0; i <= len; i++) {
    sort(adj[i].begin(), adj[i].end());
  }
  int high = 0;
  for (int i = 0; i <= len; i++) {
    if (adj[i].size() > 0) {
      int newHigh = adj[i].back();
      if (newHigh < high) {
        cout << "NO\n";
        return;
      }
      for (int j = 0; j < newHigh - high; j++) ans += "U";
      high = newHigh;
    }
    ans += "R";
  }
  cout << "YES\n";
  ans.pop_back();
  cout << ans << endl;
}
double getangleHour(int h, int m) {
  if (h == 12) h = 0;
  double pias = m * 1.0 / 2;
  return h * 30 + pias;
}
double getangleMinute(int m) { return m * 6; }
double angleClock(int hour, int minutes) {
  double d = abs(getangleMinute(minutes) - getangleHour(hour, minutes));
  return min(d, 360 - d);
}
int longestCommonSubsequence(string text1, string text2) {
  int m = text1.size();
  int n = text2.size();
  int output[m + 1][n + 1];
  output[0][0] = 0;
  for (int i = 1; i <= n; i++) output[0][i] = 0;
  for (int i = 1; i <= m; i++) output[i][0] = 0;
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      if (text1[m - i] == text2[n - j])
        output[i][j] = 1 + output[i - 1][j - 1];
      else {
        int a = output[i - 1][j];
        int b = output[i][j - 1];
        int c = output[i - 1][j - 1];
        output[i][j] = max(a, max(b, c));
      }
    }
  }
  return output[m][n];
}
void decToBinary(int n) {
  if (n == 0) {
    cout << "0";
    return;
  }
  int binaryNum[32];
  int i = 0;
  while (n > 0) {
    binaryNum[i] = n % 2;
    n = n / 2;
    i++;
  }
  for (int j = i - 1; j >= 0; j--) cout << binaryNum[j];
}
string decimalToBinary(int n) {
  string s = bitset<64>(n).to_string();
  const auto loc1 = s.find('1');
  if (loc1 != string::npos) return s.substr(loc1);
  return "0";
}
int p2(int x) {
  int ans = 0;
  while (x >= 1) {
    ans++;
    x /= 2;
  }
  return ans;
}
void solution23(int a, int b, int n) {
  for (int i = 0; i * a <= n; i++) {
    if ((n - (i * a)) % b == 0) {
      cout << "x = " << i << ", y = " << (n - (i * a)) / b;
      return;
    }
  }
  cout << "No solution";
}
bool valid(int x, int n) { return x >= 0 and x < n; }
void reconsString() {
  string s;
  cin >> s;
  int x;
  cin >> x;
  int n = s.size();
  string ans = "";
  for (int i = 0; i < s.size(); i++) {
    ans += '1';
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      if (valid(i + x, n)) ans[i + x] = '0';
      if (valid(i - x, n)) ans[i - x] = '0';
    }
  }
  bool works = 1;
  for (int i = 0; i < n; i++) {
    if (s[i] == '1') {
      if (valid(i + x, n) and ans[i + x] == '1') continue;
      if (valid(i - x, n) and ans[i - x] == '1') continue;
      works = 0;
    }
  }
  if (works) {
    cout << ans << endl;
  } else {
    cout << "-1\n";
  }
}
void sasa() {
  int n;
  cin >> n;
  std::vector<int> v(n);
  map<int, int> mp;
  for (auto &i : v) {
    cin >> i;
    mp[i]++;
  }
  int cnt = 0;
  for (int i = 0; i < n - 3; i++) {
    for (int j = i + 1; j < n - 2; j++) {
      for (int k = j + 1; k < n - 1; k++) {
        for (int l = k + 1; l < n; l++) {
          if (v[i] == v[k] and v[j] == v[l]) cnt++;
        }
      }
    }
  }
  cout << cnt << endl;
}
int fact(int n) {
  int res = 1;
  for (int i = 2; i <= n; i++) res = res * i;
  return res;
}
int nCr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }
int edu92Helper(std::vector<int> &v, int idx, bool lastLeft, int z, int k) {
  if (idx >= v.size() or idx < 0) return 0;
  if (k == 0) return 0;
  if (k > 0) {
    if (lastLeft == 0 and z > 0) {
      return max(edu92Helper(v, idx - 1, 1, z - 1, k - 1) + v[idx - 1],
                 edu92Helper(v, idx + 1, 0, z, k - 1) + v[idx + 1]);
    }
    return edu92Helper(v, idx + 1, 0, z, k - 1) + v[idx + 1];
  }
}
void r529a() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int jump = 0;
  string ans = "";
  for (int i = 0; i < s.size(); i += jump) {
    ans += s[i];
    jump++;
  }
  cout << ans << endl;
}
void prep2() {
  long long m, n, x, y;
  cin >> m >> n >> x >> y;
  long long a = m * (y - 1) + x;
  cout << "$ " << maxPrimeFactors(a) << endl;
}
void prep1() {
  int n, k;
  cin >> n >> k;
  std::vector<int> v(n);
  for (auto &i : v) {
    cin >> i;
  }
  long long totSum = 0;
  for (int i = 0; i < n; i++) {
    totSum += v[i];
  }
  int currSum = 0;
  int idx = 0;
  while (v[idx] != k and idx < n) {
    currSum += v[idx];
    idx++;
  }
  if (idx == n) {
    cout << 0 << endl;
  } else
    cout << currSum << " " << totSum - currSum - v[idx] << endl;
  ;
}
void edu92() {
  int n, k, z;
  cin >> n >> k >> z;
  std::vector<int> v(n);
  for (auto &i : v) {
    cin >> i;
  }
  cout << edu92Helper(v, 0, 0, z, k) + v[0] << endl;
}
void r306b() {
  string s;
  cin >> s;
  bool ok1 = 0, ok2 = 0;
  int past = -1;
  for (int i = 0; i < s.size(); i++) {
    cout << i << " " << past << endl;
    if (s[i] == 'A' and i <= s.size() - 2 and past != i)
      if (s[i + 1] == 'B') ok1 = 1, past = i + 1;
    if (s[i] == 'B' and i <= s.size() - 2 and past != i)
      if (s[i + 1] == 'A') ok2 = 1, past = i + 1;
  }
  if (ok1 and ok2)
    cout << "YES";
  else
    cout << "NO";
}
double r272b() {
  string s1;
  string s2;
  cin >> s1 >> s2;
  double qw = 0;
  for (auto i : s1) {
    if (i == '+')
      qw++;
    else
      qw--;
  }
  double curr = 0;
  double qcnt = 0;
  for (auto i : s2) {
    if (i == '+')
      curr++;
    else if (i == '-')
      curr--;
    else
      qcnt++;
  }
  cout << abs(qw) - abs(curr) << endl;
  cout << qcnt << endl;
  if (abs(abs(qw) - abs(curr)) > qcnt)
    return 0.0;
  else if (abs(qw) - abs(curr) == qcnt)
    return (1);
  else {
    double sas = (double)nCr(qcnt, abs(qw) - abs(curr)) / pow(2, s1.size());
    return sas;
  }
}
void r529b() {
  int n;
  cin >> n;
  std::vector<int> v(n);
  for (auto &i : v) {
    cin >> i;
  }
  sort(v.begin(), v.end());
  cout << min(v[n - 2] - v[0], v[n - 1] - v[1]);
}
void r529c() {
  int n, k;
  cin >> n >> k;
  int w = __builtin_popcount(n);
  if (w > k) {
    cout << "NO";
  } else {
    cout << "YES\n";
    int toDiv = k - w;
  }
}
void r666a() {
  int n;
  cin >> n;
  vector<string> s(n);
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  int freq[27] = {0};
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < s[i].size(); j++) {
      freq[s[i][j] - 'a']++;
    }
  }
  bool works = 1;
  for (int i = 0; i < 26; i++) {
    if (freq[i] % n == 0 or freq[i] == 0) continue;
    works = 0;
  }
  if (works)
    cout << "YES\n";
  else
    cout << "NO\n";
}
void r666b() {
  int n;
  cin >> n;
  std::vector<int> v(n);
  for (auto &i : v) {
    cin >> i;
  }
  sort(v.begin(), v.end());
}
void r666c() {
  int n;
  cin >> n;
  std::vector<long long> v(n);
  for (auto &i : v) {
    cin >> i;
  }
  if (v.size() == 1) {
    cout << "1 1\n0\n1 1\n0\n1 1\n";
    cout << -1 * v[0];
    return;
  }
  cout << "1 " << n << "\n";
  for (int i = 0; i < n - 1; i++) {
    cout << (n * -1 * v[i]) << " ";
  }
  cout << 0;
  cout << endl;
  cout << "1 " << n - 1 << endl;
  for (int i = 0; i < n - 1; i++) {
    cout << ((n - 1) * 1 * v[i]) << " ";
  }
  cout << endl;
  cout << n << " " << n << endl;
  ;
  cout << -1 * v[n - 1];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    r666c();
  }
}