#1889. 整除

整除

Background

Description

给定 n 个数字构成的一个多重集合:a1,a2,...ana_1, a_2, ... a_n ,请求出,其中有多少元素不能被任意一个在集合中的其他元素整除?

多重集合是指允许出现多个相等元素的集合。

Format

Input

第一行:单个正整数 n(<=1e6);

第二行:n 个数字表示 a1,a2,...ana_1, a_2, ... a_n(<=5e7)。

Output

单个自然数:表示集合中不能被其他数字整除的数字个数。

Samples

5
3 5 13 9 16
4

Limitation

1s, 1024KiB for each test case.

Source

YACS 491

2021年5月 丙组 T4