Little Timmy has a rectangular frame and several shapes cut out from cardboard. He tries to fit each of the shapes into the frame (one shape at a time). Sometimes the piece fits easily, sometimes it is clear that the shape is too big to fit... and sometimes Timmy just doesn't know. Then he always comes to ask you for help.
You decided to write a program that will answer Timmy's questions.
You will be given the width and height of the frame and a String shapes describing Tommy's shapes. Each of the shapes is either a circle or a rectangle.
Each element of shapes is of the one of the following forms:
- "CIRCLE RADIUS", where RADIUS is the radius of the circle.
- "RECTANGLE WIDTH LENGTH", where WIDTH and LENGTH are the dimensions of the rectangle.
Your method is supposed to return a String results, where the i-th element of results is "YES" or "NO", depending on whether the i-th shape fits into the empty frame.