I ... You - Em ... Anh
The distance between Him and Her was never mentioned by the world. Perhaps because they had no real connection before the media ever noticed.
He is a man of many faces. In front of the cameras, he always shows the world his polished, glowing image. But behind that, lies a dark side few ever get to see. His influence is so vast that many can't help but seethe with resentment whenever they meet him or hear his name. His fortune has crossed the 1.4 billion Australian dollar mark - but what he actually does, only insiders truly know.
She is nothing like him. Stubborn, hard to control, and she wears that defiance openly for the world to see. She doesn't want to live like him - someone the world would never expect to be tied to her. Whatever she does for a living, everyone knows. She's just a small trader, selling compressed carbon under pressure and heat.
As the story unfolds...
But on one quiet night, a tremor began to stir. She and he found themselves caught in the same story. And now, the distance between the two of them became something the world weighed and measured — they claimed the two stood \(N\) meters apart. They analyzed, calculated, and declared that if He took just \(x\) steps toward Her, and She took \(y\) steps toward Him, the two would finally meet. But their strides were not the same — each of His steps covered \(a\) meters, while each of Hers covered \(b\).
They built equation after equation, problem after problem, published article after article about the two of them — all just to answer one question: would She and He ever truly meet?
Note: \(x, y \in \mathbb{N}\).
Input
- Contains 100 lines, corresponding to 100 test cases. Each line contains 3 positive integers \(N, a, b \ (1 \le N, a, b \le 10^9)\).
Output
- Print 100 lines. On each line, print
YESif the answer is yes, andNOotherwise.
Scoring
- Subtask 1 (50%): \(N \le 10^6\).
- Subtask 2 (40%): \(a, b \le 10^5\).
- Subtask 2 (10%): No additional constraints.
Examples
Note: The following example simulates 5 test cases. In practice, you must handle 100 test cases.
Sample 1
input
5 2 3
6 4 5
9 2 2
5 5 9
17 7 5
output
YES
NO
NO
YES
YES
Comments