Submit | All submissions | Best solutions | Back to list |
BOOKGFT - Book Gift |
Brembo is a generous child. Every week, he does a social work with his father in an orphanage. So, he need something to give for. Something useful for children in that orphanage. He then decided to give books to the orphanage.
He buys N books in the books store. All of the books are the same kind. But, one thing that matters is every week, the number of children in that orphanage is different. Brembo is wondering whether all children will get the book equally if at that time there are M children with the N books.
(This problem is intended for beginners)
Input
The first line of input is T, the number of test case. (T <= 20)
The next T lines contains two integer, M and N that represent the number of children and the number of books. (1 <= M, N <= 1000 )
Output
Output "YES" if all children will get the number of books equally. Else output "NO".
Example
Input: 4 2 6 10 12 150 1500 1 1 Output: YES NO YES YES
Added by: | Bayu_Laksana |
Date: | 2018-03-23 |
Time limit: | 0.5s-1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | C-CLANG C NCSHARP CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG C99 CLOJURE JAVA JULIA PYPY3 PYTHON3 |
Resource: | Own Problem |
hide comments
2018-03-26 14:23:02 wisfaq
The choice of allowed languages is rather strange. Please make this problem available for all languages. |