Computer monitor screens are rectangular, and the aspect ratio of a screen is its width divided by its height. The same definition applies to a rectangular window drawn on the screen: a window's aspect ratio is its width divided by its height. For this problem, every screen and window dimension is an integer number of pixels (the individual dots, arranged in a rectangular grid, that make up an image).
Your windowing software only lets you resize a window in a way that keeps its aspect ratio unchanged. For example, a window that is 150 pixels wide and 100 pixels tall (aspect ratio $150/100 = 1.5$) can be resized to 225 by 150 pixels ($225/150 = 1.5$, so the ratio is unchanged), but it cannot be resized to 224 by 150 pixels, because that would change the aspect ratio. A window can be moved to any position on the screen, but the whole window must remain visible.
Given the size of a screen and the initial sizes of four different windows (integer widths and heights), decide whether the four windows can be resized (keeping their aspect ratios) and relocated so that together they cover the entire screen exactly, with no gaps and no overlaps.
For example, consider a square screen and four square windows. Each square has aspect ratio $1$, and all four can be resized to fill the screen exactly with no overlap (four equal squares arranged in a $2\times2$ grid). This corresponds to the first example.
The input consists of one or more data sets, followed by a single pair of zeros that ends the input.
Each data set is five pairs of integers. The first pair $W_s\ H_s$ gives the width and height of the screen. Each of the next four pairs $W_i\ H_i$ (for $i = 1, 2, 3, 4$) gives the initial width and height of one window. All values are positive integers, and the terminating pair $0\ 0$ is not a data set.
For each data set, print one line of the form Set N: Yes or Set N: No, where $N$ is the data set number counting from $1$. Print Yes if the four windows can be resized and relocated to cover the screen exactly with no overlap, and No otherwise.