Little Bernie loves to look at the stars in the sky. His favourite constellation is the Ball of Paper Constellation, because of its distinct and unmistakable shape of \ldots\ a ball of crumpled paper. Bernie downloaded a picture of the constellation from the internet, and now he wants to print it and stick it to his wall. Bernie also likes to watch the paper sheets gradually coming out of the printer, and for this occasion, he made a decision: he wants the stars to be printed in non-increasing order of brightness.
The constellation has
Bernie's plan can be described like this: for any two stars
The first line contains an integer
The uppercase letter "Y" if there is any rotation that allows the stars to be printed in non-increasing order of brightness, and the uppercase letter "N" otherwise.