Problem: Time passed and Taro became a high school student. Under the influence of my older brother who was a college student, I began to be interested in computer science. Taro read through computer science textbooks and learned that there was a famous problem called the "longest increase subsequence problem." Taro understood this problem, but was wondering if he could create a similar problem himself. Therefore, Taro created the following problem as a result of trial and error.

* There is a sequence A consisting of n integers
* Decompose the sequence A into m sequences with m-1 delimiters. In addition, each sequence after decomposition must always include one or more numbers.
* If the m numbers created by adding all the integers in each of these m sequences are arranged in the order of the original sequence, it becomes a strict increasing sequence (that is, the resulting sequence is Bi <Bi + 1). I want to do it.
* The goal is to maximize the length m of the final sequence B.



For example, consider the case where the sequence A is {5, -4,10, -3,8}.
Prepare a sequence C that represents the position of the delimiter, and set C = {2,4}.
At this time, the sequence A is divided into the parts (5, -4), (10, -3), (8), and when these interiors are added together, they become 1,7,8, respectively, and the resulting sequence B is {1, 7,8}.

<image>

Taro named this problem the "longest increase subsequence problem" and also considered an algorithm to solve it.
And I contacted you as a member of society to check it. Your job is to create a program to solve the problems created by Taro who has grown up.
Since it is my job to check, it also outputs the position of the m-1 delimiter. In addition, there may be multiple such delimiters for the optimum m, but if this m is output correctly, one of the possible ones should be output.

Constraints

> 1 ≤ n ≤ 4000
> | Ai | ≤ 108
>

* For the integer k, | k | represents the absolute value of k

Input

N + 1 integers are given, separated by line breaks.

> n
> A1
> A2
> ...
> An
>

* n represents the length of the given sequence A
* Ai represents the i-th element of the sequence A.

Output

> m
> C1 C2 .. Cm-1
>

* The first line outputs one integer m. m represents the length of the final sequence B. The second line outputs m-1 integer Ci separated by blanks. Ci represents the i-th delimiter when the sequence A is appropriately divided into m parts. See the figure for the definition of the delimiter. Note that 1 ≤ Ci <n is satisfied. The m-1 integer sequence C in the second row must be arranged in ascending order. Therefore, if i <j, then Ci <Cj holds.


* If m = 1, the second line will be blank.
* When the sequence B is generated from the sequence A according to the sequence C, when the sequence B is not an increasing sequence (that is, when i (1 ≤ i <m) such that Bi ≥ Bi + 1 exists), it becomes WrongAnswer.

Examples

Input

3
1
2
4


Output

3
1 2


Input

3
2
2
2


Output

2
1


Input

3
4
2
1


Output

1
(空行)

Solution (in CPP):

Solution:
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <bitset>
using namespace std;

typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define index(xs, x) (int)(lower_bound(all(xs), x) - xs.begin())
#define _1 first
#define _2 second
#define pb push_back
#define INF 10000
#define MOD 1000000007
inline int mp(int seg, int num) { return seg*32767 + num; };
struct SegTree {
  int MAX_N;
  vector<int> seg;
  SegTree(int n) {
    MAX_N = 1;
    while (n >= MAX_N) MAX_N <<= 1;
    seg.resize(2*MAX_N-1, mp(-INF, -1));
  }

  int query(int a, int b, int k=0, int l=0, int r=-1) {
    if (r == -1) r = MAX_N;
    if (r <= a || b <= l) return mp(-INF, -1);
    if (a <= l && r <= b) return seg[k];
    return max(query(a, b, k*2+1, l, (l+r)/2), query(a, b, k*2+2, (l+r)/2, r));
  }

  void update(int k, P v) {
    k += MAX_N-1;
    seg[k] = mp(v._1, v._2);
    while (k) {
      k = (k-1)/2;
      seg[k] = max(seg[k*2+1], seg[k*2+2]);
    }
  }
};


int N;
long long X[4001];
short pre[4001][4001];
vector<long long> ks[4001];

inline long long key(int i, int j) { return X[j] - X[i]; }
signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  cin >> N;
  rep(i, N) cin >> X[i+1];
  for (int i=0; i<N; i++) X[i+1] += X[i];

  vector<SegTree> seg;
  rep(i, N+1) {
    rep(j, i) ks[i].pb(key(j, i));
    sort(all(ks[i])); uniq(ks[i]);
    seg.pb(SegTree(ks[i].size()));
  }

  for (int r=1; r<=N; r++) {
    pre[0][r] = -1;
    seg[r].update(index(ks[r], key(0, r)), P(1, 0));
  }
  for (int l=1; l<=N; l++) {
    for (int r=l+1; r<=N; r++) {
      int p = seg[l].query(0, index(ks[l], key(l, r)));
      int p2 = p%32767, p1 = p/32767;
      if (p2 == -1) continue;
      pre[l][r] = p2;
      seg[r].update(index(ks[r], key(l, r)), P(p1+1, l));
    }
  }
  int m = seg[N].query(0, seg[N].MAX_N);
  int m2 = m%32767, m1 = m/32767;
  vector<int> ans;
  int left = m2, right = N;
  while (left != 0) {
    ans.pb(left);
    int k = left;
    left = pre[left][right];
    right = k;
  }
  reverse(all(ans));
  assert(ans.size() == m1-1);
  cout << m1 << "\n";
  for (int x : ans) cout <<x << " "; cout << "\n";
  return 0;
}