Bajtek, known for his unusual gifts, recently got an integer array x_0, x_1, …, x_{k-1}.

Unfortunately, after a huge array-party with his extraordinary friends, he realized that he'd lost it. After hours spent on searching for a new toy, Bajtek found on the arrays producer's website another array a of length n + 1. As a formal description of a says, a_0 = 0 and for all other i (1 ≤ i ≤ n) a_i = x_{(i-1)mod k} + a_{i-1}, where p mod q denotes the remainder of division p by q.

For example, if the x = [1, 2, 3] and n = 5, then:

  * a_0 = 0, 
  * a_1 = x_{0mod 3}+a_0=x_0+0=1, 
  * a_2 = x_{1mod 3}+a_1=x_1+1=3, 
  * a_3 = x_{2mod 3}+a_2=x_2+3=6, 
  * a_4 = x_{3mod 3}+a_3=x_0+6=7, 
  * a_5 = x_{4mod 3}+a_4=x_1+7=9. 



So, if the x = [1, 2, 3] and n = 5, then a = [0, 1, 3, 6, 7, 9].

Now the boy hopes that he will be able to restore x from a! Knowing that 1 ≤ k ≤ n, help him and find all possible values of k — possible lengths of the lost array.

Input

The first line contains exactly one integer n (1 ≤ n ≤ 1000) — the length of the array a, excluding the element a_0.

The second line contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 10^6).

Note that a_0 is always 0 and is not given in the input.

Output

The first line of the output should contain one integer l denoting the number of correct lengths of the lost array.

The second line of the output should contain l integers — possible lengths of the lost array in increasing order.

Examples

Input

5
1 2 3 4 5


Output

5
1 2 3 4 5 

Input

5
1 3 5 6 8


Output

2
3 5 

Input

3
1 5 3


Output

1
3 

Note

In the first example, any k is suitable, since a is an arithmetic progression.

Possible arrays x:

  * [1]
  * [1, 1]
  * [1, 1, 1]
  * [1, 1, 1, 1] 
  * [1, 1, 1, 1, 1]



In the second example, Bajtek's array can have three or five elements.

Possible arrays x:

  * [1, 2, 2]
  * [1, 2, 2, 1, 2]



For example, k = 4 is bad, since it leads to 6 + x_0 = 8 and 0 + x_0 = 1, which is an obvious contradiction.

In the third example, only k = n is good.

Array [1, 4, -2] satisfies the requirements.

Note that x_i may be negative.
#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6) {
    if (n % i == 0 || n % (i + 2) == 0) return false;
  }
  return true;
}
void swap(char a, char b) {
  char t;
  t = a;
  a = b;
  b = t;
}
long long fact(long long n) {
  if (n <= 1)
    return 1;
  else
    return n * fact(n - 1);
}
long long comb(long long n, long long k) {
  long long res = 1;
  if (k > n - k) k = n - k;
  for (long long i = 0; i < k; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
long long GCD(long long a, long long b) {
  if (b == 1)
    return 1;
  else
    return GCD(b, a % b);
}
long long digSum(long long n) {
  long long c = 0;
  while (n > 0) {
    long long x = n % 10;
    c = c + x;
    n = n / 10;
  }
  return c;
}
vector<vector<long long> > v(100010);
vector<bool> th(100010), ch(100010);
bool DFS(long long n) {
  stack<long long> s;
  long long ans = 0;
  ch[n] = true;
  s.push(n);
  while (s.size() > 0) {
    long long x = s.top();
    s.pop();
    for (long long i = 0; i < v[x].size(); i++) {
      if (ch[v[x][i]] == false) {
        s.push(v[x][i]);
        ch[v[x][i]] = true;
      }
    }
  }
  return true;
}
queue<int> q;
void BFS(long long n) {
  long long i, le[n + 1];
  q.push(n);
  le[n] = 0;
  ch[n] = true;
  while (q.size() > 0) {
    long long x = q.front();
    q.pop();
    for (i = 0; i < v[x].size(); i++) {
      if (ch[v[x][i]] == false) {
        q.push(v[x][i]);
        ch[v[x][i]] = true;
        le[v[x][i]] = le[x] + 1;
      }
    }
  }
}
long long count(long long n) {
  long long c = 0, k = n;
  while (k > 0) {
    long long x = k % 10;
    c = c + 1;
    k = k / 10;
  }
  return c;
}
double area(long long x1, long long y1, long long x2, long long y2,
            long long x3, long long y3) {
  return abs((double)((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2))) /
             (double)(2));
}
bool isBin(long long n) {
  while (n > 0) {
    long long x = n % 10;
    if (x > 1) return false;
    n /= 10;
  }
  return true;
}
long long ans[1001500] = {0};
long long near(long long n) {
  long long i = n - 1, j = n + 1, c = 0, d = 0;
  while (1) {
    if (isPrime(i) == true) return i / 2;
    if (isPrime(j) == true) return j / 2;
    i--;
    j++;
  }
}
long long modRecursion(long long a, long long b, long long c) {
  if (b == 0) return 1;
  if (b == 1)
    return a % c;
  else if (b % 2 == 0) {
    return modRecursion((a * a) % c, b / 2, c);
  } else {
    return (a * modRecursion((a * a % c), b / 2, c)) % c;
  }
}
int main() {
  long long n, k, i;
  cin >> n;
  long long a[n];
  cin >> a[0];
  long long b[n];
  b[0] = a[0];
  for (i = 1; i < n; i++) {
    cin >> a[i];
    b[i] = a[i] - a[i - 1];
  }
  long long fl = 0;
  vector<long long> v;
  for (i = 1; i < n; i++) {
    fl = 0;
    if (b[i] == a[0]) {
      long long k = i;
      for (long long j = 0; k < n; j++) {
        if (b[j] != b[k]) {
          fl = 1;
          break;
        }
        k++;
        if (j == i) j = 0;
      }
      if (fl == 0) {
        v.push_back(i);
      }
    }
  }
  sort(v.begin(), v.end());
  cout << v.size() + 1 << endl;
  for (i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << n;
}
