#K49677. Chocolates Distribution
Chocolates Distribution
Chocolates Distribution
You are given a total of N chocolates and a requirement that each friend should receive exactly M chocolates. Your task is to determine whether it is possible to distribute the chocolates evenly such that every friend gets exactly M chocolates. In mathematical terms, you need to check if the following condition holds:
$N \bmod M = 0$
If the condition is satisfied, the answer is 'Yes'; otherwise, it is 'No'.
inputFormat
The input is read from standard input (stdin) and consists of two space-separated integers:
- N: the total number of chocolates,
- M: the number of chocolates each friend should receive.
outputFormat
Output a single string to standard output (stdout):
- 'Yes' if N is divisible by M,
- 'No' otherwise.
10 2
Yes