#P1211D. Teams
Teams
No submission language available for this problem.
Description
There are table bowling players, the rating of the -th player equals . Compose a maximum number of teams in a such way that:
- each player belongs to at most one team;
- each team contains exactly players;
- each team contains a group of players with the same rating and a group of players with another same rating, which must be times larger than the rating of the players in the first group.
For example, if , , , , , you can compose two teams with ratings and one team with ratings . So, the maximum number of teams is .
Find the maximum number of teams by given and to compose in respect to the given requirements.
The first line of the input contains four integers , , and (, ). The second line contains the sequence of player's ratings — integers ().
Print only one integer — the maximum number of teams that can be composed from given players.
Input
The first line of the input contains four integers , , and (, ). The second line contains the sequence of player's ratings — integers ().
Output
Print only one integer — the maximum number of teams that can be composed from given players.