#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef unsigned long long ull; typedef long long ll; typedef unsigned int ui; struct Pair { int first; int second; Pair() {} Pair(int first, int second) :first(first), second(second) {} bool operator<(const Pair &other) const { return second < other.second; } bool operator>(const Pair &other) const { return second > other.second; } }; struct Tuple { ll a; ll b; ll c; int index; Tuple() {} Tuple(ll a, ll b, ll c, int index) { this->a = min(a, min(b, c)); this->c = max(a, max(b, c)); this->b = a + b + c - this->a - this->c; this->index = index; } bool operator<(const Tuple &other) const { if (c != other.c) return c < other.c; if (b != other.b) return b < other.b; return a < other.a; } bool operator>(const Tuple &other) const { return !(*this < other); } }; struct Wrap { int* index; Wrap(int* index) : index(index) {} bool operator<(const Wrap&other) const { return (*index) < (*other.index); } bool operator>(const Wrap&other) const { return (*index) > (*other.index); } }; int ini() { int result; scanf("%d", &result); return result; } ll inl() { ll result; scanf("%I64d", &result); return result; } char inc() { char result; scanf(" %c", &result); return result; } double ind() { double result; scanf("%lf", &result); return result; } void swap(int &a, int &b) { int temp = a; a = b; b = temp; } int modul(int a) { return a < 0 ? -a : a; } ll n, m, k, t, u, v, j, i, x1, y11, x2, y2; const ll MODULO = 1000000007; char ch; double d; ll arr[100002]; int main() { freopen("long.in", "r", stdin); freopen("long.out", "w", stdout); n = inl(); m = inl(); ll total = 0; for (int i = 0; i < n; i++) { arr[i] = inl(); total += arr[i]; } int count = 0; for (int i = 1; i < 100; i++) { ll total_mod = 0; for (int j = 0; j < n; j++) { total_mod = (total_mod + (arr[j] % i)) % i; } if (total_mod == 0) { printf(count ? " %d": "%d", i); count++; } } return 0; }