#include<stdio.h>
#include<stdlib.h>

int main(void) {
	int* A;
	int N;

	scanf("%d", &N);
	A = (int*)calloc(N, sizeof(int));
	for (int i = 0; i < N; i++) {
		scanf("%d", &A[i]);
	}
	printf("%p\n",A);

	int num = 0;
	char* flag = (char*)calloc(N,sizeof(char));
	for (int i = 0; i < N; i++)
		flag[i] = 1;
	printf("%p\n", flag);

	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			 //printf("%d,%d\n",i,j);
			if ((i != j) && (A[i] % A[j] == 0)) {
				flag[i] = 0;
				break;
			}
		}
		if (flag[i])
			num++;
		//printf("%d \n", flag[i]);
	}
	printf("%d\n", num);

	printf("0");
	free(A);
	printf("1");
	free(flag);
	printf("2");
	return 0;
}