#K7616. Gift Bags Distribution
Gift Bags Distribution
Gift Bags Distribution
You are given three integers N, K, and M. The task is to determine whether it is possible to create K gift bags such that each bag contains exactly N items using a total of M items. Mathematically, the distribution is possible if and only if \(K \times N \le M\). If the condition holds, the program should print YES
; otherwise, it should print NO
.
This problem requires basic arithmetic validations and ensures the usage of standard input and output for processing.
inputFormat
The input consists of a single line containing three space-separated integers:
- N: the number of items per gift bag.
- K: the number of gift bags.
- M: the total number of items available.
For example: 5 3 15
outputFormat
Output a single line containing YES
if it is possible to distribute the items as required; otherwise, output NO
.
5 3 15
YES