After becoming a Guardian, Jack Frost thought he would be bolstering faith in the children around the world. Little did he know, it was all a scheme so Santa could increase unpaid labour and lay off some elves. After decades of making presents instead of being tasked with protecting the children, Jack has had enough.
To make Santa happy, Jack Frost decides to buy some presents. The goal of his presents is to make Santa feel a certain way, in particular a happiness of . Any higher or any lower, and Santa just might not change his mind. Before buying the gifts, Santa's happiness is .
There are different gifts types that are available for purchase in the North Pole, the of which will increase Santa's happiness by . He can buy each gift type as many times as he wants. For each gift Jack buys, he can also choose to break it, which will decrease Santa's happiness by .
Given the constraints, will Jack make Santa happy?
Constraints
Input Specification
The first line contains two integers, and .
The next line contains space-separated integers, .
Output Specification
Output Santa is happy
if there is a way, and Santa is mad
if there is not.
Sample Input 1
3 24
1 6 10
Sample Output 1
Santa is happy
Sample Explanation 1
Jack can buy gift type twice, and type once, to give Santa a happiness of . Then, by purchasing gift type twice, and breaking both, he decreases Santa's happiness to .
Sample Input 2
5 12
5 228 3 56 69
Sample Output 2
Santa is happy
Sample Input 3
5 19
18 6 24 63 123
Sample Output 3
Santa is mad
Comments