Processing math: 100%
GCD 2 - MarisaOJ: Marisa Online Judge

GCD 2

Time limit: 1000 ms
Memory limit: 256 MB
Count the number of integer pairs 1≤x,y≤n such that gcd(x,y) is a prime number. ### Input - A single line containing an integer n. ### Output - Print a single integer, which is the number of pairs that satisfy the condition. ### Constraints - 1≤n≤2×106. ### Example Input: 4 Output: 4