#C10571. Divide Employees into Teams
Divide Employees into Teams
Divide Employees into Teams
You are given two integers \( n \) and \( k \) where \( n \) represents the total number of employees and \( k \) represents the number of teams into which these employees need to be divided. The task is to determine if it is possible to divide the employees into \( k \) teams such that each team has the same number of employees.
If the division is exact, output "YES" followed by the number of employees per team, i.e. \( \frac{n}{k} \). Otherwise, output "NO".
Note: The input will be provided via stdin and the answer should be printed to stdout.
inputFormat
The input consists of a single line containing two integers separated by a space:
- n: the total number of employees.
- k: the number of teams desired.
Input is read from stdin.
outputFormat
If \( n \) is divisible by \( k \), output YES X
(without quotes) where X
is the number of employees per team, i.e. \( X=\frac{n}{k} \). Otherwise, output NO
.
The output should be printed to stdout.
## sample10 2
YES 5