题目
Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M ≤ m × p M\le m\times p M≤m×p where M M M and m are the maximum and minimum numbers in the sequence, respectively.
Now given a sequence and a parameter p p p, you are supposed to find from the sequence as many numbers as possible to form a perfect subsequence.
Input Specification:
Each input file contains one test case. For each case, the first line contains two positive integers N N N and p p p, where N ( ≤ 1 0 5 ) N(\le10^5) N(≤10