GCD Pairs
시간 제한5초메모리 제한2048 MB
길이 1e5 이하이고 각 원소가 1e12 이하인 배열에서, 최대공약수가 1보다 큰 제곱수로 나누어지지 않는 쌍의 개수를 센다.
문제
In the Shape Galaxy, where all shapes are sentient beings, there is currently a feud between circles and squares. Circles want all pathways to be flat while squares argue that they should be evenly spaced inverted catenary shaped bumps. Because of this feud, circles have begun to dislike all square-biased numbers. A number is square-biased if it is divisible by , for some integer .
Mr. Circle has taken this feud to heart. He is given the assignment of calculating the greatest common divisor between all pairs of numbers in an array. He wants to go one step further and count the number of greatest common divisors that are not square biased.
입력
The first line of input contains a single integer, , representing the length of the array of numbers.
The next lines contain the integers which comprise the numbers in the array.
출력
Output a single integer, the number of pairs such that is not square-biased.