#CCBCMCHIN0000010. Bội số (Multiples)
Bội số (Multiples)
Multiples
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem Statement
Given two positive integers and . They are considered multiples of each other if is divisible by or is divisible by . Determine whether this relationship holds.
Input
A single line contains two positive integers and .
Output
Print exactly Sao Multiplos if the values are multiples of each other; otherwise print Nao sao Multiplos.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Example 1
Input
6 24
Output
Sao Multiplos
Explanation
For A = 6 and B = 24, the two relevant remainders are A % B = 6 and B % A = 0. At least one must be zero; therefore the output is Sao Multiplos.
Example 2
Input
6 25
Output
Nao sao Multiplos
Explanation
For A = 6 and B = 25, the two relevant remainders are A % B = 6 and B % A = 1. At least one must be zero; therefore the output is Nao sao Multiplos.