408841: GYM103348 C Juliet's Garden
Description
Juliet is anxiously waiting for Romeo to return to Verona so they can go get married. She has a garden with $$$n$$$ flower beds arranged in a circle. She starts at the flower bed $$$1$$$ and starts walking clockwise around the circle at an ever-increasing pace. If she is currently at flower bed $$$c$$$ at the start of minute $$$i$$$, by the end of that minute she will briefly stop and rest at flower bed $$$c + i$$$ and then immediately continue walking from that point at the start of the minute $$$i + 1$$$ (i.e. by the end of minute $$$1$$$ she stops and rests at flower bed $$$2$$$ and then at the start of minute $$$2$$$ she starts walking and at the end of minute $$$2$$$ she has stopped and rested at flower bed $$$4$$$). Flower bed $$$n$$$ is followed by flower bed $$$1$$$ in the circle.
Juliet could be waiting for an infinitely long amount of time because she hasn't heard at all from Romeo so the Nurse is curious if Juliet will end up stopping and resting at all the $$$n$$$ flower beds in the circle during her walk.
InputThe input is a single line containing a single integer $$$n$$$ ($$$1 \leq n \leq 10^{4}$$$) representing the number of unique flower beds within Juliet's garden.
OutputOutput YES if Juliet will ever stop and rest at all the flower beds in her garden while waiting for Romeo and NO otherwise.
ExamplesInput2Output
YESInput
3Output
NO