Lucas has gone to a casino to play the spinning wheel game. Lucas knows the total number of other participants i.e. n. Lucas will get only one chance to spin the wheel and he gets the output x. But other participants ( since they are old customers of the casino) can choose to spin the wheel any number of times. Suppose that the ith participant chooses to spin the wheel Si times . Lucas can win from the any other participant if any number from all the numbers that the ith person gets by spinning the wheel is exactly divisible by the number that Lucas himself gets. For given value of n, x, all Si’s, the corresponding numbers, you have to let Lucas know how many times will he win and the number i of all the participants who will be defeated by Lucas.
INPUT FORMAT
First line contains n and x. Next n lines will have Si - the number of times the ith player chooses to spin the wheel followed by Si integers that they obtain on spinning it.
OUTPUT FORMAT
Print total number of participants from whom Lucas will win and in the next line print all the i’s (number of the participant) from whom Lucas will win. Outputs in the second line should be space seperated.
CONSTRAINTS
1 <= n <=100 1 <= Si <=100 1 <= x and Si values < 106
EXPLANATION
First participant chooses to spin the wheel twice but never gets a number divisible by 5. So Lucas won’t be able to win from first participant.
Second participant chooses to spin the wheel thrice. He gets 10 the second time and 20 the third time. Since both of them are divisible by 5, Lucas will win from second participant.