HP is doing research in mathematics . After doing lots of research, she struck in a problem . She found four numbers n,a, b and c .Now, She wants to know how many number exists which are less than or equal to n and are divisible by a ,b or c .
Input : First line contains 't' denoting numbers of test cases
Next t lines contains 4 integers denoting n,a,b and c separated by space
Output : 't' lines containing the count of the numbers which are divisible a,b,c
Constraints :
1≤t≤105
1≤n≤109
1≤a,b,c≤105
Here n = 15 , a= 2, b=3,c = 5 The number which are divisible by a ,b, or c are 2,3,4,5,6,8,9,10,12,14,15 i.e 11 numbers , so output is 11