You are given a polynomial of degree N with integer coefficients: f(x)=a_Nx^N+a_{N-1}x^{N-1}+...+a_0. Find all prime numbers p that divide f(x) for every integer x.

Constraints

* 0 \leq N \leq 10^4
* |a_i| \leq 10^9(0\leq i\leq N)
* a_N \neq 0
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N
a_N
:
a_0


Output

Print all prime numbers p that divide f(x) for every integer x, in ascending order.

Examples

Input

2
7
-7
14


Output

2
7


Input

3
1
4
1
5


Output




Input

0
998244353


Output

998244353
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	
	public static void main(String[] args) throws IOException {
		MyScanner sc = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);
		int N = sc.nextInt();
		long[] pol = new long[N + 1];
		for (int i = 0; i <= N; i++) {
			pol[N-i] = sc.nextInt();
		}
		boolean[] primes = new boolean[N + 2];
		Arrays.fill(primes, true);
		for (int i = 2; i < primes.length; i++) {
			if (primes[i]) {
				for (int j =  i + i; j < primes.length; j+=i) {
					primes[j] = false;
				}
				if (divides(pol.clone(), i)) out.println(i);
			}
		}
		int p0 = (int)Math.abs(pol[0]);
		for (int i = 0; i <= N; i++) {
			p0 = gcd(p0, Math.abs((int)pol[i]));
		}
		for (int prime = 2; prime * prime <= p0 ; prime++) {
			if (p0 % prime == 0) {
				if (prime >= primes.length && divides(pol.clone(), prime)) out.println(prime);
			}
			while (p0 % prime == 0) p0 /= prime;
		}
		if (p0 > 1 && p0 >= primes.length && divides(pol.clone(), (int)p0)) out.println(p0);
		
		out.flush();
	}
	
	static int gcd(int a, int b) {
		return b == 0 ? a : gcd(b, a%b);
	}
	
	static boolean divides(long[] pol, int p) {
		int n = pol.length - 1;
		while (n >= p) {
			pol[n - p + 1] += pol[n];
			pol[n] = 0;
			n--;
		}
		for (int i = 0; i < p && i < pol.length; i++) {
			if (pol[i] % p != 0) return false;
		}
		return true;
	}
	
	static class MyScanner {
		private BufferedReader br;
		private StringTokenizer tokenizer;
		
		public MyScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
		
		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		
		public int nextInt() {
			return Integer.parseInt(next());
		}
		
		public long nextLong() {
			return Long.parseLong(next());
		}
	}
}
