import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.math, std.typecons;
import std.numeric;

void main() {
    int n; scan(n);
    auto g = readln.split.to!(int[]).reduce!((a, b) => gcd(a, b));

    int[] div;

    for (int i = 1; i*i <= g; i++) {
        if (g % i == 0) {
            div ~= i;
            div ~= g / i;
        }
    }

    div.sort().uniq.each!(d => writeln(d));
}






void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}

