#Lutece1842. prime

prime

Migrated from Lutece 1842 prime

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

宿管有一套神奇的系统控制来控制寝室的灯的开关:

title 共有N盏灯,标号为1到N,有M个标有不同质数的开关,开关可以控制所有标号为其标号倍数的灯,按一次开关,所有其控制的灭着的灯都点亮,所有其控制的亮着的灯将熄灭。现在,宿管可以无限的按所有开关,所有灯初始状态为熄灭,请求出最多能点亮几盏灯。

Input

输入有多组数据,第一行一个正整数T表示数据组数。 每组数据第一行两个整数N,M。 第二行M个不同的质数表示开关上的标号,保证所有标号<=N。

对于100%的数据,T<=10,N<=1000。 所有标号不相等,M≤N以内质数数。

Output

对于每组数据输出一行一个整数表示最多亮灯数。

Samples

4
10 2
2 5
21 4
2 3 5 7
100 1
5
100 3
3 19 7
5
11
20
42

Resources

每周一题div1