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;
using ll = long long;
const long long int mod = 1e9 + 7;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char* x) { cerr << '\"' << x << '\"'; }
void __print(const string& x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V>& x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T& x) {
  int f = 0;
  cerr << '{';
  for (auto& i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
template <typename T>
void print(vector<T> v) {
  for (T i : v) cout << i << " ";
  cout << '\n';
}
template <typename T>
void print(vector<vector<T>>& v) {
  for (vector<T>& vv : v) {
    for (T& i : vv) cout << i << " ";
    cout << '\n';
  }
}
template <typename T>
void read(vector<T>& v) {
  for (T& i : v) cin >> i;
}
template <typename T>
void read(T&& t) {
  cin >> t;
}
template <typename T, typename... Args>
void read(T&& t, Args&&... args) {
  cin >> t;
  read(forward<Args>(args)...);
}
template <typename T>
void print(T&& t) {
  cout << t << '\n';
}
template <typename T, typename... Args>
void print(T&& t, Args&&... args) {
  cout << t << " ";
  print(forward<Args>(args)...);
}
bool checkPrime(ll n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (ll i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
ll binpow(ll a, ll b, ll mod) {
  a %= mod;
  ll res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return res;
}
ll to_int(string str) {
  ll n = str.size(), num = 0;
  for (int i = 0; i < n; i++) {
    num = num * 10 + (str[i] - '0');
  }
  return num;
}
ll gcd(ll a, ll b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return (a / gcd(a, b) * b); }
ll sumofDigits(ll n) {
  ll sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
bool isPalindrome(string& str) {
  int n = str.size();
  for (int i = 0; i < n; i++) {
    if (str[i] != str[n - i - 1]) {
      return false;
    }
  }
  return true;
}
string toBinary(ll n) {
  string str = "";
  while (n > 0) {
    str += n % 2 + '0';
    n /= 2;
  }
  reverse(str.begin(), str.end());
  return str;
}
ll toDecimal(string str) {
  ll n = str.size(), ans = 0;
  for (ll i = n - 1; i >= 0; i--) {
    if (str[i] == '1') {
      ans += pow(2, n - i - 1);
    }
  }
  return ans;
}
ll modInverse(ll n, ll mod) { return binpow(n, mod - 2, mod); }
ll C(ll n, ll r, ll p) {
  if (r == 0 or n == r) return 1;
  ll fac[n + 1];
  fac[0] = 1;
  for (ll i = 1; i <= n; i++) {
    fac[i] = fac[i - 1] * i;
    fac[i] %= p;
  }
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
vector<ll> storePrimes;
void seive() {
  vector<ll> is_prime(1e6 + 5, 0);
  for (ll i = 2; i * i <= 1000000; i++) {
    if (is_prime[i] == 0)
      for (ll j = i * i; j <= 1000000; j += i) {
        is_prime[j] = 1;
      }
  }
  for (ll i = 1; i <= 1000000; i++) {
    if (is_prime[i] == 0) {
      storePrimes.push_back(i);
    }
  }
}
bool isPowerof2(ll n) {
  if ((n & (n - 1)) == 0) return true;
  return false;
}
ll ceil(ll a, ll b) { return (a + b - 1) / b; }
vector<ll> rotateArray(vector<ll>& arr, ll d) {
  ll n = arr.size();
  vector<ll> tmp(n);
  for (ll i = 0; i < n; i++) {
    tmp[i] = arr[(i + d) % n];
    tmp[i] = arr[(n + i - d) % n];
  }
  return tmp;
}
signed main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  vector<int> diff;
  diff.push_back(arr[0]);
  for (int i = 1; i < n; i++) {
    diff.push_back(arr[i] - arr[i - 1]);
  };
  vector<int> ans;
  for (int i = 1; i <= diff.size(); i++) {
    vector<vector<int>> segments;
    int mn = 1e4;
    for (int j = 0; j < diff.size(); j += i) {
      vector<int> seg;
      for (int k = j; k < min((int)diff.size(), j + i); k++) {
        seg.push_back(diff[k]);
      }
      mn = min(mn, (int)seg.size());
      segments.push_back(seg);
    };
    bool can = 1;
    for (int k = 1; k < segments.size(); k++) {
      vector<int> a = segments[k];
      vector<int> b = segments[k - 1];
      for (int go = 0; go < min((int)a.size(), (int)b.size()); go++) {
        if (a[go] != b[go]) {
          can = 0;
          break;
        }
      }
      if (!can) break;
    }
    if (can) {
      ans.push_back(i);
    }
  }
  print(ans.size());
  print(ans);
}
