#C7913. Banana Distribution for Monkeys
Banana Distribution for Monkeys
Banana Distribution for Monkeys
You are given an integer \( M \) representing the number of monkeys and a list of \( M \) integers. The \( i \)-th integer represents the number of bananas desired by the \( i \)-th monkey. Your task is to determine whether it is possible to distribute the bananas so that each monkey receives exactly the number of bananas specified.
The requirement can be stated mathematically as follows: Given a sequence \( a_1, a_2, \dots, a_M \), check if \( a_1 = a_2 = \cdots = a_M \). If this condition holds, output Yes; otherwise, output No.
Note: The input is provided via standard input (stdin) and the result should be written to standard output (stdout).
inputFormat
The first line of input contains a single integer \( M \), representing the number of monkeys.
The second line contains \( M \) space-separated integers \( a_1, a_2, \dots, a_M \), where \( a_i \) is the number of bananas desired by the \( i \)-th monkey.
outputFormat
Output a single line containing Yes if all monkeys desire an equal number of bananas; otherwise, output No.
## sample2
4 4
Yes