import std.stdio;
import std.array;
import std.algorithm;
import std.conv;
import std.string;
import std.numeric;

void main() {
    int n; readf("%d\n", &n);
    int[] x = readln.chomp.split(" ").map!(to!int).array;
    int g = x.reduce!gcd;
    for (int i = 1; i <= g; i++) {
        if (g % i == 0) i.writeln;
    }
}