You are given an array a of integers. But there is something special about these integers. All of the integers are square free. Formally, for each i, if ai=pq11∗pq22∗...∗pq2m where every pj(1≤j≤m) is a prime, then qj≤1.
Coming to the problem, You need to find the number of subarrays where the maximum number of the subarray is also the LCM (Least Common Multiple) of the subarray.
Input Format
Output Format
Constraints
In the second test case, the subarrays that satisfy the conditon are:
[1,1],[1,2],[2,2],[3,3],[4,4].