#include<iostream>
using namespace std;
int N_MAX = 10001;
int main()
{
  int n,m,i,a,s=0;
  bool b[N_MAX];
  cin >> n;
  fill(b,b+N_MAX,0);
  b[6]=1;
  b[10]=1;
  b[15]=1;
  n-=3;
  for(i=2;n>0&&i*6<=10000;i++,n--)
    b[i*6]=1;
  for(i=2;n>0&&i*10<=10000;i++)
    if(!b[i*10]){
      b[i*10]=1;
      n--;
    }
  for(i=2;n>0&&i*15<=10000;i++)
    if(!b[i*15]){
      b[i*15]=1;
      n--;
    }
  for(i=1;i<N_MAX;i++)
    if(b[i])
      cout << i << " ";
  cout << endl;
  return 0;
}
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <cstring>
#include <istream>
#include <algorithm>
#include <map>
#include <cmath>
#include <unordered_map> 
using namespace std;

int gcd(int a, int b) {
	if (a < b) {
		int c = a;
		a = b;
		b = c;
	}
	if (b == 0)return a;
	else return gcd(b, a % b);
}

bool vis[1000000005];

int main() {
	memset(vis, false, sizeof(vis));
	int n;
	cin >> n;
	map<int, int>mp;
	vector<int>a(n);
	for (auto& i : a)cin >> i;
	int min = 0x3F3F3F3F;
	for (auto i : a)if (min > i)min = i;
	mp[min] = 1;
	for (auto i : a) {
		for (int j = 1; j * j <= i && j < min; j++) {
			int ans = i;
			if (i % j == 0 && vis[j] == 0) {
				vis[j] = 1;
				for (auto k : a) {
					if (k % j == 0)ans = gcd(ans, k);
					if (ans == j) {
						mp[j] = 1; break;
					}
				}
			}
			ans = i;
			if (i % j == 0 && vis[i / j] == 0 && i / j < min) {
				vis[i / j] = 1;
				int ccc = i / j;
				for (auto k : a) {
					if (k % ccc == 0)ans = gcd(ans, k);
					if (ans == ccc) {
						mp[ccc] = 1; break;
					}
				}
			}
		}
	}
	cout << mp.size() << endl;
	return 0;
}
