Mock CCC '19 Contest 1 J1 - Dividers

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

You are in a class of N students. The teacher has baked M cookies. Will your teacher be able to distribute the cookies such that every student gets an equal number of cookies, and that there are no cookies left?

Input Specification

The first line will contain two integers, N, M (1 \le N, M \le 10^9).

Output Specification

If the cookies can be divided evenly, output Hooray! The cookies can be distributed evenly!. Otherwise, output Boo! The cookies cannot be distributed evenly :(.

Subtasks

For 10/15 of the points, N, M \le 100.

Sample Input 1

3 15

Sample Output 1

Hooray! The cookies can be distributed evenly!

Sample Input 2

4 3

Sample Output 2

Boo! The cookies cannot be distributed evenly :(

Comments

There are no comments at the moment.